[Smtk-developers] JSON in SMTK
Sebastien Jourdain
sebastien.jourdain at kitware.com
Tue Sep 12 10:22:02 EDT 2017
Protobuf is used inside ParaView for the message format over the network.
I think the question here is related about reading (and maybe writing) JSON
(configuration) files which is different than what protobuf has to offer.
Just my 2 cents...
Seb
On Tue, Sep 12, 2017 at 7:49 AM, Haocheng Liu <haocheng.liu at kitware.com>
wrote:
>
>
> On Mon, Sep 11, 2017 at 6:24 PM, David Thompson <
> david.thompson at kitware.com> wrote:
>
>> > It seems that we are using a C - library for JSON processing - has
>> anyone looked at C++ 11 libs like:
>> > https://github.com/nlohmann/json
>>
>> It looks nice. I would like to kick the tires a little, but it looks good
>> enough to replace cJSON if it doesn't have any fatal flaws.
>>
>> @Ben jsoncpp is really terrible:
>> + it is not concise to use (I'm not sure nlohmann is either because it
>> lives in the "nlohmann" namespace);
>> + it is slow -- see https://github.com/miloyip/nat
>> ivejson-benchmark#parsing-time where cJSON takes 25ms and jsoncpp takes
>> 166ms; nlohmann takes 71 ms which is not great but look at how easy it is
>> to use; and
>> + it is heavy (243k-LOC vs 42k for nlohmann and 27k for cJSON)
>>
>> We should help move CMake/VTK away from jsoncpp instead of designing
>> software by seniority.
>>
> While browsing, I come across this data serization format as protobuf
> <https://github.com/google/protobuf> developed by Google. It's four times faster
> than JSON and using much less space
> <https://google.github.io/flatbuffers/flatbuffers_benchmarks.html>. Is
> there any reason why we stick to JSON or can we move to a better data
> format?
>
> David
>> _______________________________________________
>> 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>
>
> _______________________________________________
> Smtk-developers mailing list
> Smtk-developers at smtk.org
> http://public.kitware.com/mailman/listinfo/smtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/smtk-developers/attachments/20170912/2bca012d/attachment.html>
More information about the Smtk-developers
mailing list