jsonserializer Questions

6

Solved

I am using Newtonsoft's JsonSerializer to serialise some classes. As I wanted to omit one field of my class in the serialisation process, I declared it as follow: [JsonIgnore] public int ParentId...
Alcaeus asked 23/2, 2015 at 12:46

2

Solved

I want to serialize object in c# and learn that we can do this both JsonSerializer and JsonConvert. I know about documentation knowledges about these. But I want to know which is better to u...
Ichthyology asked 12/8, 2016 at 10:12

5

In a ASP.NET core 5 application, I use GraphQL with GraphQL.SystemTextJson. When I attempt to return a result, I get s System.NotSupportedException saying "Serialization and deserialization of...
Midkiff asked 2/4, 2021 at 12:55

2

Solved

I am using a Minimal API to recreate an old REST service and so I need to mimic the functionality of the previous service as close as possible. Information in the old service is returned Pascal cas...
Billfish asked 20/9, 2022 at 13:54

5

Solved

I'd like to use pydantic for handling data (bidirectionally) between an api and datastore due to it's nice support for several types I care about that are not natively json-serializable. It has bet...
S asked 8/1, 2021 at 0:56

8

Solved

I am trying to use JavaScriptSerializer in my application. I initially received Cannot find JavaScriptSerializer and I solved it by adding: using System.Web.Script.Serialization; But then...
Vinegarish asked 23/10, 2012 at 16:34

4

Solved

I have a class with a private List<T> property which I would like to serialize/deserialize using the JsonSerializer. Use of the JsonPropertyAttribute doesn't seem to be supported in .NET Core...
Guardafui asked 18/5, 2020 at 12:16

4

Solved

I have the following two classes where one is extending from the other like this : @JsonSerializable(nullable: true) class Response { final String responseCode; final String responseMessage; fin...
Boarish asked 2/6, 2020 at 4:43

12

I'm trying to understand the JSON serialization landscape in Ruby. I'm new to Ruby. Is there any good JSON serialization options if you are not working with Rails? That seems to be where this ans...
Jeromejeromy asked 16/12, 2010 at 18:19

3

I am trying to map a DocumentSnap from Firebase to a Json Class in Flutter. I can confirm that my is getting the data from the document, but i cannot pass the gathered data to my Json object. I hav...

2

JSON.NET supports circular reference serialization by preserving all references with the following settings: JsonSerializerSettings settings = new JsonSerializerSettings(); settings.ReferenceLoopH...
Guanajuato asked 5/8, 2013 at 19:10

3

Solved

I'm serializing decimals using Newtonsoft.Json.JsonSerializer. How can I set it to serialize decimal numbers with only 1 decimal place to use 0 at the end. i.e. 3.5 serializes to "3.50"?
Proportional asked 26/7, 2013 at 2:4

19

Solved

I'm using JAVA 1.6 and Jackson 1.9.9 I've got an enum public enum Event { FORGOT_PASSWORD("forgot password"); private final String value; private Event(final String description) { this.value...
Pedigree asked 18/9, 2012 at 0:12

3

Solved

I have tried use camelCase insentive on .NET 6 for deseralize content from API I configured like this in Startup.cs, but it is not working .AddControllers() .AddJsonOptions(options => { opti...
Nasopharynx asked 27/4, 2022 at 19:1

2

A web service is sending me a JSON string. It contains a valid JSON string, but it is poorly formatted. Is there a way I can format it to better display it on the screen? I was hoping to appl...
Frau asked 19/9, 2022 at 18:1

2

Solved

I have an endpoint in .NET 6 Microsoft.NET.Sdk.Web project that deserialize query strings into a .NET object by using the standard [FromQuery] [Route("[controller]")] public class Samples...

5

Solved

What's the difference between JsonConvert.DeserializeObject and JObject.Parse? As far as I can tell, both take a string and are in the Json.NET library. What kind of situation would make one more c...
Abeyance asked 14/5, 2014 at 3:13

1

Solved

I have the following simple classes : public abstract class GitObject { public Repository Repository { get; set; } public abstract string Serialize(); public abstract void Deserialize(string dat...
Hiatt asked 25/4, 2022 at 14:9

2

Solved

I have a webapi that returns some Json: {"id":9,"businessName":"dummy","address":"pluto","products":[ {"id":762,"descripti...
Whipcord asked 17/2, 2022 at 12:24

2

I am new in Xamarin Forms and I am trying to create a method that requests a list of items from an API. However, I am not able to compile the solution due to the error message "Cannot Convert...
Yardley asked 4/8, 2021 at 2:27

1

Solved

I am trying to serialize an object into a MemoryStream using System.Text.Json's JsonSerializer. I am unable to find the implementation/method of that in the documentation. Can someone share the sam...

8

Solved

I have an object (parse tree) that contains child nodes which are references to other nodes. I'd like to serialize this object, using JSON.stringify(), but I get TypeError: cyclic object valu...
Dressing asked 21/2, 2012 at 17:27

1

Solved

I am using JSON serializer helper function to easy access of dictionary(basically received as JSON) objects. jsondict.py """Utilities for working with JSON and json-like structures -...
Plagiarism asked 24/1, 2021 at 21:39

1

I'm running into a problem where I can't deserialize a string into a Task using System.Text.Json (.Net 5). JsonSerializer.Deserialize<Task<TItem>>(serializedItem) Background I have a l...
Aronarondel asked 25/9, 2020 at 7:16

3

Ok, we're using Newtonsoft's JSON.NET product, which I really love. However, I have a simple class structure for hierarchical locations that look roughly like this... public class Location { publ...
Robbie asked 2/5, 2011 at 23:15

© 2022 - 2024 — McMap. All rights reserved.