[Smtk-developers] JSON in SMTK

Haocheng Liu haocheng.liu at kitware.com
Thu Sep 14 11:19:03 EDT 2017


On Thu, Sep 14, 2017 at 10:52 AM, David Thompson <david.thompson at kitware.com
> wrote:

> I think since it is header-only that we would not need to mangle it, but
> rather install it inside the smtk include tree (e.g.,
> include/smtk/thirdparty/nlohmann_json) so that others can use exactly the
> version SMTK is compiled with. We can define a macro (yes!) for nlohmann's
> include path so that it is possible to use an external version or third
> party version:
>
> Not a lover for MACRO:( I vote for a tarball in superbuild or a submodule
of SMTK.

> #include "smtk/Options.h"
> #include SMTK_NLOHMANN_JSON_H
>
>     David
>
> On Sep 14, 2017, at 10:44, Bob Obara <bob.obara at kitware.com> wrote:
>
> I definitely like the nlohmann version better - did we determine if we
> need to mangle it?
>
> So should it and pugiXML be moved into the superbuild in the near future
> as external projects?
>
> Bob
>
>
> Robert M. O'Bara, MEng.
> Assistant Director of Scientific Computing
>
> Kitware Inc.
> 28 Corporate Drive
> Suite 101
> Clifton Park, NY 12065
>
> Phone: (518) 881- 4931 <(518)%20881-4931>
>
>
>
>
> On Sep 13, 2017, at 5:37 PMEDT, David Thompson <david.thompson at kitware.com>
> wrote:
>
> Hi all,
>
> I've looked a little more into jsoncpp and nlohmann_json. Attached is my
> experiment with syntax and getting UUIDs and arrays of UUIDs serialized.
> nlohmann does not require calls to converter functions nor does it even
> require a converter... UUIDs just worked (however, we probably want a
> converter as its default behavior writes UUIDs as JSON arrays of unsigned
> integers).
>
> I continue to like nlohmann and dislike jsoncpp in terms of terseness and
> legibility of the resulting code. The one thing I dislike about nlohmann is
> that the repo seems to contain super-huge test files, making it slow to
> clone.
>
> Attached are example programs for each library that do the same thing
> (create JSON data including UUIDs). I have not tried parsing/dumping large
> objects.
>
> David
>
>
> <json.tar.gz>
>
>
>
> _______________________________________________
> Smtk-developers mailing list
> Smtk-developers at smtk.org
> http://public.kitware.com/mailman/listinfo/smtk-developers
>
>


-- 
Best regards
Haocheng

Haocheng LIU
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4421 <(518)%20881-4421>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/smtk-developers/attachments/20170914/7b05795b/attachment.html>


More information about the Smtk-developers mailing list