1. 07 Oct, 2018 1 commit
  2. 15 Aug, 2018 6 commits
  3. 17 May, 2018 2 commits
    • Ingvar Stepanyan's avatar
      Simplify JSON number decoding · cc743297
      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`.
      cc743297
    • Ingvar Stepanyan's avatar
      Rewrite JSON decoding · 1b81092b
      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.
      1b81092b
  4. 05 Feb, 2018 1 commit
  5. 11 Jan, 2018 1 commit
    • Kenton Varda's avatar
      Replace all include guards with #pragma once. · 677a52ab
      Kenton Varda authored
      @kloepper pointed out a while back that every compiler you've ever heard of supports this. Plus, it's more concise, it's not prone to copy-paste errors, and it looks nicer.
      
      At the time I wanted to remain consistent and I didn't feel like spending the time to update all my existing code. But, every time I've added a new header since I've cursed the include guard, so I finally broke down and changed it.
      677a52ab
  6. 06 Dec, 2017 1 commit
  7. 28 Jul, 2017 1 commit
    • Kenton Varda's avatar
      Add new `capnp convert` command with JSON support. · c4c5e404
      Kenton Varda authored
      This supersedes the `capnp encode` and `capnp decode` commands. It didn't make sense to add JSON to those commands since it was unclear if JSON should be thought of as the "encoded" or "decoded" format. `convert` allows mapping anything to anything.
      
      This command is also useful for, say, converting unpacked format to packed format or vice versa, which can now be done without a schema.
      c4c5e404
  8. 22 May, 2017 1 commit
    • Kenton Varda's avatar
      Disable implicit conversion from string literal to ArrayPtr<const char>. · 97aae1bb
      Kenton Varda authored
      This conversion would end up including the NUL terminator in the array, which is almost never what you want.
      
      We can perhaps re-enable this in the future and have it automatically remove the NUL terminator, but we should do at least one release with it disabled to catch anyone who might be affected by the change in behavior.
      97aae1bb
  9. 02 May, 2016 1 commit
  10. 01 May, 2016 1 commit
  11. 23 Mar, 2016 1 commit
  12. 13 Nov, 2015 1 commit
  13. 12 Nov, 2015 1 commit
  14. 09 Nov, 2015 1 commit
  15. 08 Aug, 2015 1 commit
  16. 06 Aug, 2015 1 commit
    • Kenton Varda's avatar
      WIP JSON encoder/decoder library. Currently only encodes. · e3e9ce8d
      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...
      e3e9ce8d