Loading ...
Sorry, an error occurred while loading the content.

Re: [json] Yet another C++ JSON Serializer

Expand Messages
  • Stephan Beal
    On Wed, Apr 25, 2012 at 2:28 AM, loki.astari@ymail.com
    Message 1 of 2 , Apr 24, 2012
    • 0 Attachment
      On Wed, Apr 25, 2012 at 2:28 AM, loki.astari@... <
      loki.astari@...> wrote:

      > **
      > namespace ThorsAnvil { namespace Serialize { namespace Json {
      > template<> struct JsonSerializeTraits<MyClass>
      >

      Here's a similar API, modelled after libs11n (http://s11n.net):

      http://fossil.wanderinghorse.net/repos/nosjob/index.cgi/wiki?name=s11n

      --
      ----- stephan beal
      http://wanderinghorse.net/home/stephan/
      http://gplus.to/sgbeal


      [Non-text portions of this message have been removed]
    • loki.astari@ymail.com
      Hi all, I tried searching for a FAQ but failed to find one so I hope it is OK to post about my C++ JSON Serializer/De-Serializer here. I reviewed a couple of
      Message 2 of 2 , Apr 24, 2012
      • 0 Attachment
        Hi all,

        I tried searching for a FAQ but failed to find one so I hope it is OK to post about my C++ JSON Serializer/De-Serializer here.

        I reviewed a couple of alternative C++ libraries for JSON parsing but found non adequate (in terms of ease of use). So I built my own:

        I have posted my project on Git-Hub <https://github.com/Loki-Astari/ThorsSerializer> and placed the code in the public domain <https://github.com/Loki-Astari/ThorsSerializer/blob/master/COPYRIGHT>.

        Note:
        The code is still Alpha (I have only tested in my own code base (though there are extensive unit tests provided)).
        Know deficiencies: The parser currently assumes UTF-8 input.

        Objective:
        ==========
        The objective is to make serialization/de-serialization of C++ object to/from JSON trivial.

        This means:
        1. does not build a JSON object. Reads data directly into C++ object.
        2. In normal usage there should be NO need to write any code.
        3. User should not need to understand JSON or validate its input.
        4. Should work seamlessly with streams.
        5. Standard containers should automatically work

        Note: I tried to post example usage here but the formatting worked against me and it looked really bad.

        See the README: https://github.com/Loki-Astari/ThorsSerializer/blob/master/README
        and the test.cpp: https://github.com/Loki-Astari/ThorsSerializer/blob/master/test.cpp

        I am also getting the code reviewed here:
        http://codereview.stackexchange.com/questions/11138/json-serializer



        Enjoy Loki.
      Your message has been successfully submitted and would be delivered to recipients shortly.