Storage Service Exception when null attributes

0 votes
We are using the storage service and are parsing a Unity C# object into a JSON string.  Not all properties of the object are used on every call, and therefore sometimes the attributes contain null when parsed to JSON.  What we are seeing is that when there are null values in the attributes, the service call fails:

storageService.InsertJSONDocument(ofDatabaseName, ofEventCollectionName, json.ToString());

{"app42Fault":{"httpErrorCode":400,"appErrorCode":2605,"message":"Bad Request","details":"Passed JSON string '{\"SessionId\":null,\"LaneName\":null,\"Details\":null,\"RangeName\":null,\"ContentId\":null,\"_$acl\":[{\"PUBLIC\":\"R\"}],\"ShotX\":-1,\"_$updatedAt\":\"2014-07-01T16:11:13.784Z\",\"EventType\":\"Shot\",\"ShotY\":-1,\"EventDate\":\"/Date(1404231074630-0400)/\",\"Username\":\"test_0\",\"GameMode\":\"Practice\",\"_$owner\":{\"owner\":\"_App_Admin_User\"},\"_$createdAt\":\"2014-07-01T16:11:13.784Z\"}' is not valid."}}

Can we not save null values into App42 even though null is a valid value both in JSON and in NoSQL?  How can we work around this without having to cycle check the values on every request?  There are a ton of these writes occurring and we cant check the properties of the serialized object on every request.
asked Jul 1, 2014 in App42 Cloud API-BaaS by shawn (25 points)

1 Answer

0 votes
 
Best answer
Hi Shawn,

Null values are not allowed due to some restrictiona at our backend layer. You can make your own application specitic character set for it and replace this value with the same. Let me knwo if it helps.

Thanks

Ajay
answered Jul 2, 2014 by ajay123 (899 points)
selected Jul 2, 2014 by shawn
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...