basho / riak

Riak is a decentralized datastore from Basho Technologies.
http://docs.basho.com
Apache License 2.0
3.94k stars 536 forks source link

RiakTS HTTP API - JSON Response - Null values are returned as [] [JIRA: RIAK-3396] #910

Open mankyKitty opened 7 years ago

mankyKitty commented 7 years ago

When querying RiakTS via the HTTP API, the JSON response contains empty lists [] in place of null values for columns that are nullable. Given that the content type is JSON, it might be better if it included null instead?

Received: "000056A0",428659426,0,2145479396,0,[]]] Expected: "000056A0",428659426,0,2145479396,0,null]]

This would make decoding the response a bit easier as the value would more closely match expectations that a null value is null.

When a value is present in a nullable column, the data is returned as expected, it is not contained in a list.

The Protobuf API is not affected by this as far as I know.

lukebakken commented 7 years ago

@mankyKitty please see basho/riak_kv#1645