Using .net to build a server and save data from the server to App42, that clients will then retreive in unity3d.
I pull data from other API with the server ( financial data in that case ), that i put in a collection, and then try to save that on App42.
When i Serialize the collection via newtonsoft.json in C#, i get the followiing json :
[{"id":1,"name":"Bitcoin","symbol":"BTC","slug":"bitcoin","circulating_supply":"17817825","total_supply":"17817825","max_supply":"21000000","date_added":"2013-04-28T00:00:00Z","cmc_rank":1,"price_usd":10671.0584356,"price_btc":1.0,"volume_24h":23185304866.5182,"percent_change_1h":1.57316,"percent_change_24h":-3.85315,"percent_change_7d":-6.54577,"market_cap":190135051770.29456,"last_updated":"2019-07-14T21:13:30Z"},{"id":1027,"name":"Ethereum","symbol":"ETH","slug":"ethereum","circulating_supply":"106899675.5615","total_supply":"106899675.5615","max_supply":null,"date_added":"2015-08-07T00:00:00Z","cmc_rank":2,"price_usd":238.58230671,"price_btc":0.022357885878879574,"volume_24h":8582925524.28892,"percent_change_1h":1.12083,"percent_change_24h":-10.1693,"percent_change_7d":-21.368,"market_cap":25504371182.013287,"last_updated":"2019-07-14T21:13:19Z"}]
Which gives the following error when tryign to save that document :
com.shephertz.app42.paas.sdk.csharp.App42BadParameterException: {"app42Fault":{"httpErrorCode":400,"appErrorCode":2605,"message":"Bad Request","details":"Passed JSON string is not valid."}}
at com.shephertz.app42.paas.sdk.csharp.connection.RESTConnectorAsync.ExecutePost(String url, Dictionary`2 paramsDics, String bodyPayLoad, Dictionary`2 headerParams)
at com.shephertz.app42.paas.sdk.csharp.storage.StorageService.InsertJSONDocument(String dbName, String collectionName, String json)
at com.shephertz.app42.paas.sdk.csharp.storage.StorageService.<InsertJSONDocument>c__AnonStorey0.<>m__0()
I am not sure how to serialize that collection in order for it to be "valid" ?
This is how i convert the collection ( using newtonsoft.Json )
string json = JsonConvert.SerializeObject(list_coin);
Storage storage = storageService.InsertJSONDocument(dbName,collectionName,json);
Any help would be greatly appreciated, as i am planning to use jsons a lot and wish for an easy converter to be used.