Commit graph

7 commits

Author SHA1 Message Date
90af0edcbb System/Libraries/Json: Fundamental (breaking) changes to API
Going forward, the following methods will require a mem_task to be
provided: Clone, CreateArray, CreateObject, Parse, Stringify.

For JsonArray, append/insert/prepend will take arguments in the form
((index,) value, type). A JsonItem will automatically be created which
encapsulates this value and type. If type is not specified, the
following will be done to determine the type:

- Cast value to JsonElement* and check if the signature matches. If it
  does, assign type as value(JsonElement*)->type; or

- If value > 0x1000, assign type as JSON_STRING; or

- Otherwise, assign type as JSON_BOOLEAN.
2025-03-09 13:16:33 -04:00
64f31de070 Everywhere: Use slon_mem_task for memory allocation 2025-03-06 09:54:26 -05:00
81d65056a9 System/Libraries/Json: Implement @json_stringify_string to eliminate StrLen() bottleneck 2025-02-27 11:30:08 -05:00
40b3fceab1 System/Libraries/Json: Prepend signature to elements 2025-02-20 08:05:07 -05:00
fcc95d971b System/Libraries/Json: Keep escaped unicode in its original form, and let the program ingesting the JSON handle the UTF-8 conversion 2025-02-17 14:53:42 -05:00
cafa3158a3 System/Libraries/Json: Properly escape double-quotes when stringifying a string 2025-02-17 13:23:16 -05:00
52cb92f587 Meta: Add files to repository 2025-02-16 15:21:19 -05:00