Add JsonMerge().

Closes #15.
This commit is contained in:
Jordan Bancino 2023-11-06 19:59:46 -05:00
parent 01da37f7d7
commit ba1ac5b42b
2 changed files with 38 additions and 0 deletions

View file

@ -320,4 +320,13 @@ extern JsonValue * JsonGet(HashMap *, size_t,...);
*/
extern JsonValue * JsonSet(HashMap *, JsonValue *, size_t,...);
/**
* Recursively merge two JSON objects. The second object is merged
* on top of the first; any keys present in the first object that are
* also present in the second object are replaced with those in the
* second object, and any keys present in the second object that are
* not present in the first object are copied to the first object.
*/
extern void JsonMerge(HashMap *, HashMap *);
#endif /* CYTOPLASM_JSON_H */