[Smtk-developers] Propose to change the serialization logic of numberOfValues/Items in attribute system

Haocheng Liu haocheng.liu at kitware.com
Thu Dec 21 15:34:30 EST 2017


Hi,

In the past when we serialize items between client and server,

 we serialize "NumberOfValues" info  and we also serialize data for each
item as(Ex. componentItem)

[ { "Val": { "Resource": "uuid-1", "Component": "uuid-2" }
},{"UnsetVal": True} ... ]

which is pretty verbose as David has pointed out.

Actually since we serialize the values in the ComponentItem as a array, the
array size would be naturally equal to the NumberOfValues. There is no need
to repeat this info.

Meanwhile, it would be better to serialize the data as:

[ [ "uuid-1", "uuid-2"], ... ]

which is cleaner and easier.

Ideas?
-- 
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://smtk.org/pipermail/smtk-developers/attachments/20171221/e4980e58/attachment.html>


More information about the Smtk-developers mailing list