- 15 Aug, 2018 5 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
Features: - Rename any field or enum value for JSON purposes. - Flatten structs/groups into their parent object, possibly with a prefix. - Assign a special discriminant field for unions, so that union members can be flattened without ambiguity.
-
- 17 May, 2018 3 commits
-
-
Ingvar Stepanyan authored
Simplifiy implementation and, as a bonus, allow overflowing floating numbers to convert to +/-Infinity like they do in JSON.parse. Also update outdated comment about NaN and Infinity being encoded as `null`.
-
Ingvar Stepanyan authored
-
Ingvar Stepanyan authored
- Add support for decoding with Orphanage. - Allow decoding of non-struct root JSON objects. - Add support for custom decoding type handlers. - Add support for custom decoding field handlers.
-
- 07 Apr, 2017 2 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
-
- 19 Nov, 2016 1 commit
-
-
Harris Hancock authored
-
- 02 May, 2016 1 commit
-
-
Kenton Varda authored
Fix JSON handler for DynamicStruct. The handler needs to be told the struct's schema to construct an orphan. Also improve error message when addTypeHandler() is given a handler for a dynamic type but no specific schema is specified. We could support this eventually but we don't presently.
-
- 01 May, 2016 1 commit
-
-
Kenton Varda authored
Problem discovered and initial test case contributed by Harris Hancock.
-
- 21 Apr, 2016 1 commit
-
-
Branislav Katreniak authored
-
- 06 Apr, 2016 1 commit
-
-
Branislav Katreniak authored
This allows to preserve these values in capnp -> json -> capnp conversion.
-
- 31 Mar, 2016 1 commit
-
-
Branislav Katreniak authored
-
- 30 Mar, 2016 1 commit
-
-
Branislav Katreniak authored
-
- 23 Mar, 2016 1 commit
-
-
Branislav Katreniak authored
-
- 13 Dec, 2015 4 commits
-
-
Erik Sjölund authored
-
Erik Sjölund authored
-
Erik Sjölund authored
-
Erik Sjölund authored
-
- 20 Nov, 2015 1 commit
-
-
Kenton Varda authored
-
- 12 Nov, 2015 3 commits
-
-
Kamal Marhubi authored
Such values are not allowed by the JSON spec. We match the behavior of JSON.stringify in Firefox and Chrome. fixes https://github.com/sandstorm-io/capnproto/issues/261
-
Kamal Marhubi authored
-
Kamal Marhubi authored
Per spec.
-
- 09 Nov, 2015 4 commits
-
-
Kamal Marhubi authored
-
Kamal Marhubi authored
-
Kamal Marhubi authored
This includes: - ensuring we don't go off the end of input if it's not null-terminated - checking for overflow and underflow - being more careful to check that numbers match JSON lexical syntax
-
Kamal Marhubi authored
-
- 06 Nov, 2015 1 commit
-
-
Kamal Marhubi authored
-
- 05 Nov, 2015 1 commit
-
-
Kamal Marhubi authored
This is the first step towards JSON decoding, implementing the basic functionality of JsonCodec::decodeRaw. The main outstanding issues are: - it allows trailing commas in arrays and objects - it is too liberal in number syntax, eg allowing a leading + - it does rejects non-ASCII characters in \u escapes Refs https://github.com/sandstorm-io/capnproto/issues/255
-
- 06 Aug, 2015 1 commit
-
-
Kenton Varda authored
The library allows for registering special handlers for specific types or fields. This is particluarly useful for overriding the way `Data` is encoded (since many approaches exist) or supporting encodings like EJSON or Q which extend JSON with special types encoded as objects with field names perfixed by dollar signs. Not integrated into build system yet (but builds nicely with Ekam). I think this is going to need to be a separate library, e.g. libcapnp-json, because clearly a lot of Cap'n Proto users don't need it at all. For the moment, this was written for use inside Sandstorm. There is no current need for a decoder, so I have not written that yet and have no immediate plans to do so. But it will be added before any official Cap'n Proto release, certainly. A simple recursive descent parser should be easy...
-