[Smtk-developers] JSON in SMTK
David Thompson
david.thompson at kitware.com
Thu Sep 14 10:52:47 EDT 2017
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:
#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
>
>
>
>
>> 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>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/smtk-developers/attachments/20170914/4d5b555e/attachment-0001.html>
More information about the Smtk-developers
mailing list