Questions tagged [json-serialization]
The json-serialization tag has no usage guidance.
json-serialization
331
questions
0
votes
0
answers
27
views
JSON serialization with a group by query ... how to?
I have an API endpoint to pull a big JSON blob from one of my models, and it works, but I'd like to improve it. The current implementation is below, and mostly just works using built in associations.
...
1
vote
0
answers
62
views
do not serialize empty collections (and handle accordingly in deserialization)
I have a bunch of POCOs that can be (de-)serialized from/to json. A lot of content is collections. I want the serialized JSON to only contain a specific property if its collection is not empty (...
-1
votes
0
answers
44
views
Getting NotSerializable exception [duplicate]
Getting below error while serializing Java object class:
java.io.NotSerializableException: com.google.gson.JsonObject
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1240)
at java....
0
votes
0
answers
29
views
Write Access Violation when Serializing rapidjson::GenericDocument with PrettyWriter to GenericStringBuffer
I am working with RapidJSON and trying to serialize a rapidjson::GenericDocument object using rapidjson::PrettyWriter to a rapidjson::GenericStringBuffer. Here is the relevant part of my code:
typedef ...
0
votes
0
answers
20
views
From String to JSON back to String properties order
I cannot find how JSON order object properties.
I thought it was alphabetical, but it seems it isn't.
I've tried to find how JSON ordering object properties but I can't find it.
0
votes
0
answers
65
views
ASP.NET Core use dependency injection for custom type in xml output formatter
In my ASP.NET Core project, I have a custom type which needs to be serialized using some external service:
public struct MyCustomType
{
private int value;
public MyCustomType(int value) { ...
0
votes
2
answers
59
views
How to correctly manage databinding and serialization/deserialization of a BitmapImage?
That's my basic code:
public class MyObject
{
public decimal MyDeciaml { get; set; }
public string? MyImageBase64
{
get
{
if (MyImageBase64 != null)
...
0
votes
1
answer
48
views
Use WCF of .NET Framework to serialize a class as a primitive
I am using Windows Communication Foundation classes to serialize and deserialize classes to and from JSON in files via the DataContractJsonSerializer class. I know there are better ways to serialize ...
0
votes
0
answers
38
views
Unable to deserialise ProblemDetails Extensions property
I am facing an issue when deserializing Microsoft.AspNetCore.Mvc.ProblemDetails object,
basically Extension property is not return back to the client
I have writted a simple test webapi app in .NET8 ...
0
votes
2
answers
157
views
UE5 UPROPERTY variable name being serialized with camel case by FJsonObjectConverter::UStructToJsonObject
I'm using UE 5.3.
I have a UPROPERTY variable named 'issuetype'. When serializing using FJsonObjectConverter::UStructToJsonObject it produces 'issueType'. It only does this in packaged builds, not ...
2
votes
1
answer
96
views
Serialize Object using JsonConvert with specific format
I am using JsonConvert.SerializeObject method to serialize this object:
var objx = new JsonObject
{
["prob1"] = new JsonObject
{
["phone"] = "1019577756",
...
0
votes
1
answer
212
views
VS2022 17.9.3 C# interactive window, cannot use System.Text.Json
I get the following errors if I run Json import code in C# Interactive
From VS2022, View->Other Windows->C# interactive
Anyone knows how to import the libraries in C# interactive to get this to ...
1
vote
1
answer
129
views
How can I tell which JSON serialization will be used on my Azure function?
In Visual Studio, if I create a new project using the "Azure Functions" template, the JSON serialization used by that function will be different depending on which version of the template I ...
0
votes
0
answers
49
views
How to ignore null properties in HttpApplication json response in .Net Framework
Same question as
How to Ignore Null values while serializing OData response
and
.NET Core: Remove null fields from API JSON response
Only difference is how to do it in .NetFramework 4.7.2 with ...
0
votes
2
answers
146
views
How to test Azure function ObjectResult's JSON serialization
I'm working on a CustomClaimsProvider, although for the purposes of this question, all that matters is that it's an Azure Function with an HTTP trigger. The code here is based on the example code in ...