tagged [json]
How to get string objects instead of Unicode from JSON
How to get string objects instead of Unicode from JSON I'm using to parse JSON from text files. When loading these files with either [json](https://docs.python.org/2/library/json.html) or [simplejson]...
- Modified
- 25 Sep at 14:20
Serialize enum values as camel cased strings using StringEnumConverter
Serialize enum values as camel cased strings using StringEnumConverter I'm trying to serialize a list of objects to JSON using Newtonsoft's JsonConvert. My Marker class includes an enum, and I'm tryin...
- Modified
- 14 Sep at 09:53
Explanation of JSONB introduced by PostgreSQL
Explanation of JSONB introduced by PostgreSQL PostgreSQL just introduced [JSONB](http://www.depesz.com/2014/03/25/waiting-for-9-4-introduce-jsonb-a-structured-format-for-storing-json/) in version 9.4,...
- Modified
- 5 Sep at 07:19
How to handle both a single item and an array for the same property using JSON.net
How to handle both a single item and an array for the same property using JSON.net I'm trying to fix my SendGridPlus library to deal with SendGrid events, but I'm having some trouble with the inconsis...
json add new object to existing json file C#
json add new object to existing json file C# I'm trying to automate the addition of new objects to an existing JSON file. I looked all around the web but only found adding data and stuff but not a who...
Which JSON content type do I use?
Which JSON content type do I use? There are many "standards" for the [JSON](http://en.wikipedia.org/wiki/JSON) content type: Which one do I use, and where? I assume security and browser support issues...
- Modified
- 29 Aug at 10:22
How to output Django queryset as JSON?
How to output Django queryset as JSON? I want to serialize my queryset, and I want it in a format as this view outputs: I simply d
- Modified
- 19 Aug at 21:43
Fetch: POST JSON data
Fetch: POST JSON data I'm trying to POST a JSON object using [fetch](https://developer.mozilla.org/en-US/docs/Web/API/GlobalFetch/fetch). From what I can understand, I need to attach a stringified obj...
- Modified
- 18 Aug at 07:9
JavaScript find json value
JavaScript find json value I need to search inside a json list of countries. The json is like: I get from database only the code and would output the entire name. So if I get "AL" I would like to retr...
- Modified
- 17 Aug at 14:44
ServiceStack Deserialize Json with Required Attribute
ServiceStack Deserialize Json with Required Attribute I'm trying to get the deserialization to throw an exception if a certain JSON attribute is missing. ex. This should deserialize fine (and it does)...
- Modified
- 11 Aug at 19:0
System.Text.Json.JsonElement ToObject workaround
System.Text.Json.JsonElement ToObject workaround I want to know the equivalent of the `ToObject()` method in [Json.NET](https://www.newtonsoft.com/json/help/html/Introduction.htm) for . Using Json.NET...
- Modified
- 10 Aug at 14:32
Error "Uncaught SyntaxError: Unexpected token with JSON.parse"
Error "Uncaught SyntaxError: Unexpected token with JSON.parse" What causes this error on the third line? ``` var products = [{ "name": "Pizza", "price": "10", "quantity": "7" }, { "name": "Cerveja...
- Modified
- 8 Aug at 18:20
How to map JSON to C# Objects
How to map JSON to C# Objects I am having issues with understanding how to make this happen. Basically we have an API, the user sends a JSON of the format: I have a class ca
Retuning JObject\dynamic with ServiceStack seems to return
Retuning JObject\dynamic with ServiceStack seems to return I'm trying to take a JSON string from SQL (works fine with SQL json queries, it's stuctured fine in there) and return it through ServiceStack...
- Modified
- 5 Jul at 13:59
Can comments be used in JSON?
Can comments be used in JSON? Can I use comments inside a [JSON](https://en.wikipedia.org/wiki/JSON) file? If so, how?
Why can't Python parse this JSON data?
Why can't Python parse this JSON data? I have this JSON in a file: I wrote this s
ServiceStack: How do I Serialize a nested object of Dictionary<string, object>?
ServiceStack: How do I Serialize a nested object of Dictionary? ``` //Structure public List> EventData { get; set; } = new List
- Modified
- 30 Jun at 18:22
System.Text.Json.JsonException: The input does not contain any JSON tokens
System.Text.Json.JsonException: The input does not contain any JSON tokens I'm just trying to use a Http POST method in a Blazor app through _http and myObject have been defined elsewhere, but I'm get...
- Modified
- 23 Jun at 15:11
Use of PUT vs PATCH methods in REST API real life scenarios
Use of PUT vs PATCH methods in REST API real life scenarios First of all, some definitions: PUT is defined in [Section 9.6 RFC 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.6): > Th...
- Modified
- 20 Jun at 09:30
ServiceStack: REST API call not interpreted correctly (and OpenAPI / Swagger output is strange)
ServiceStack: REST API call not interpreted correctly (and OpenAPI / Swagger output is strange) The APIs I define in ServiceStack are not generating a correct OpenAPI spec, or at least, ServiceStack d...
- Modified
- 17 Jun at 01:33
Add JObject to JObject
Add JObject to JObject I have a json structure like this: I would like to add a new empty Object like "report":{} to the json My C# code is like
How can I deserialize JSON with C#?
How can I deserialize JSON with C#? I have the following code: The input in `responsecontent` is JSON, but it is not properly deserialized into an object. How should I properly deserialize it?
- Modified
- 15 Jun at 15:26
How to generate JSON data with PHP?
How to generate JSON data with PHP? I have to genera
Each parameter in the deserialization constructor on type must bind to an object property or field on deserialization
Each parameter in the deserialization constructor on type must bind to an object property or field on deserialization I have the following simple classes : ``` public abstract class GitObject { publ...
- Modified
- 5 Jun at 19:24