summaryrefslogtreecommitdiff
path: root/AK/JsonObject.h
AgeCommit message (Collapse)Author
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2019-12-30AK: Add JsonObject::get_ptr() for copy-free lookupAndreas Kling
This variant of get() returns a const JsonValue* instead of a JsonValue and can be used when you want to peek into a JsonObject's member fields without making copies.
2019-10-29AK: Allow JsonValue to store 64-bit integers internallyAndreas Kling
Add dedicated internal types for Int64 and UnsignedInt64. This makes it a bit more straightforward to work with 64-bit numbers (instead of just implicitly storing them as doubles.)
2019-10-21JsonObject: Add JsonObject::has(key)Andreas Kling
2019-09-06AK: Rename <AK/AKString.h> to <AK/String.h>Andreas Kling
This was a workaround to be able to build on case-insensitive file systems where it might get confused about <string.h> vs <String.h>. Let's just not support building that way, so String.h can have an objectively nicer name. :^)
2019-08-27JSON: Port JsonArray and JsonObject serialization to serializersSergey Bugaev
This way, primitive JsonValue serialization is still handled by JsonValue::serialize(), but JsonArray and JsonObject serialization always goes through serializer classes. This is no less efficient if you have the whole JSON in memory already.
2019-08-07JSON: Templatize the JSON serialization codeAndreas Kling
This makes it possible to use something other than a StringBuilder for serialization (and to produce something other than a String.) :^)
2019-08-04Json: Add efficient copy and move constructors for Json{Array,Object}Andreas Kling
This helps avoid copying JsonValues during parsing.
2019-07-08AK: Add JsonObject::set(key, &&value) overload.Andreas Kling
This dodges a whole bunch of value copying in JsonParser.
2019-06-24JsonObject: Let the compiler generate a copy constructor.Andreas Kling
This was only needed while HashMap was noncopyable. :^)
2019-06-18AK: Rename JsonObject::to_string() and pals to serialized().Andreas Kling
And the variant that serializes into a StringBuilder is called serialize().
2019-06-17AK: Use a single StringBuilder throughout JSON serialization.Andreas Kling
2019-06-17AK: Add some classes for JSON encoding.Andreas Kling
This patch adds JsonValue, JsonObject and JsonArray. You can use them to build up a JsonObject and then serialize it to a string via to_string(). This patch only implements encoding, no decoding yet.