How to modify Janusgraph(Gremlin) server API response, array of strings

Srikanth Rachakonda <srikanth....@...>

Recently, I've upgraded Janusgraph to version 0.5.2, it supports the Serializer versions GryoMessageSerializerV3d0, ..V2, ..V1 (Backwards compatibility). In the version3 response for the datatypes strings and array of strings, response format is same. I want the response to be separated.

Current response format(v3):

"@type": "g:Map", "@value": [ "_id", // string { "@type": "g:List", "@value": [ "id1" ] }, "names", // array of strings { "@type": "g:List", "@value": [ "Name1", "Name2" ] }, ]

For both datatypes, the response format is {"@type": "g:List",}. My requirement is how can I distinguish the whether datatype is array/string. I can't check for the each key in loop, it won't be proper solution considering there are large number of array datatypes. Is there anything which can be configured at the serialization level. Any other solution to separate the response(Array as array and String as string).

Note: Even for the other serialization versions(v2, v1) there is no differentiation, but response style is different(["id1"], ["Name1", "Name2"]). Everything is array of strings.



Join to automatically receive all group messages.