Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
-3 votes
1 answer
67 views

Everything works as expected until the json string is deserialized after the post back. Class: public class RegretLetterDetail { public int PositionID { get; set; } [Display(Name = "...
Danie Schoeman's user avatar
0 votes
0 answers
55 views

I have a nested entity, defined like this: entity.OwnsOne(e => e.EncryptedElements, o => { o.ToJson(); o.OwnsMany(x => x.Values, o => { o.Property(x ...
ZorgoZ's user avatar
  • 3,758
1 vote
1 answer
118 views

So i have WeaponStats class that contains one of classes that inherit from IDamageType. Fire is empty bacause i didn't receive anything back from game designer and its still empty. But i can add ...
Jariz's user avatar
  • 13
-1 votes
1 answer
100 views

I'm using Freezed and json_serializable in a Flutter project. My API returns a nested JSON like this: { "success": true, "message": "Login successful", "data&...
ilyasDev's user avatar
0 votes
1 answer
112 views

Classes having JsonView annotated attributes provide different generated serializers with jackson reflect free optimization in quarkus. I have the following attribute enabled in our project. quarkus....
Gautam Lihala's user avatar
0 votes
0 answers
58 views

Use case Say I have an HTTP endpoint that constructs an immutable object then sends that immutable object to multiple sinks. Maybe I send it to a couple of message brokers, other HTTP endpoints, a ...
BPS's user avatar
  • 1,691
0 votes
0 answers
39 views

I have a class which has Include.NON_EMPTY configuration on class level. @JsonInclude(value = JsonInclude.Include.NON_EMPTY) public class Item extends ExtraInfo { String id; List<String> ...
Jaydip Bari's user avatar
0 votes
1 answer
602 views

I have created a (fresh) solution in Visual Studio 2022 17.12.4 with the following projects: ClassLibrary1 (.NET framework 4.8) Has System.Text.Json installed version 9.0.1 Has a static method Just....
J.P.'s user avatar
  • 11
0 votes
0 answers
87 views

I'm building an ASP.NET Core Web API for AOT publishing and need to configure source-generated JSON serialization for it, as reflection-based serialization will not work for AOT. According to ...
Daniil Palii's user avatar
  • 1,295
0 votes
2 answers
81 views

Below class is the recursive dictionary (tree-like structure). The EntityID is just the alias of string which must be accessed via HierarchicalRelationshipsMap.EntityID. public class ...
Takeshi Tokugawa YD's user avatar
0 votes
0 answers
282 views

I need to use traditional POCO mapping to jsonb with PostgreSQL and EF Core (.net 8). The structure of those classes in fairly complex and I don't need to query them with Linq to EF. But I need to be ...
ZorgoZ's user avatar
  • 3,758
0 votes
1 answer
87 views

I have used the json_serializable library in flutter and created a class and created the Annotation of the library i.e. json_serializable in the class as below example: import 'package:json_annotation/...
Mohamad Hasan Salmaaniyaan's user avatar
0 votes
1 answer
302 views

I need to use Newtonsoft JSON serializer for all calls made via Flurl 4.0 (or at least for all calls made by a specific Flurl client), but I cannot figure out how to set it up. From the answer to the ...
Alek Davis's user avatar
  • 10.8k
0 votes
1 answer
58 views

In flutter, I'm trying to define a form field model. The form type is a enum, based on which different Field are to be returned. My text field should look like this on toJson(): type : "text"...
Ouroboros's user avatar
  • 1,534
0 votes
1 answer
42 views

I have a JSON object as: {"username":"johndoe","email":"[email protected]", "secretToken":"token123","secretKey":"password&...
jgp's user avatar
  • 2,101
0 votes
1 answer
329 views

I'm working with Flutter and using Freezed for my data types and json deserialization. The database I'm working with will sometimes send the ID element as an int (without quotations) or as a string (...
Zach's user avatar
  • 1
0 votes
0 answers
59 views

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. ...
valenumr's user avatar
1 vote
0 answers
169 views

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 (...
Kjara's user avatar
  • 2,956
0 votes
0 answers
94 views

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 ...
manjuv's user avatar
  • 347
0 votes
0 answers
24 views

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.
user1182625's user avatar
0 votes
0 answers
102 views

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) { ...
Ozren Kinkela's user avatar
0 votes
2 answers
80 views

That's my basic code: public class MyObject { public decimal MyDeciaml { get; set; } public string? MyImageBase64 { get { if (MyImageBase64 != null) ...
markzzz's user avatar
  • 48.3k
0 votes
1 answer
79 views

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 ...
bchase's user avatar
  • 61
0 votes
2 answers
612 views

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 ...
MashedPotato6587's user avatar
2 votes
1 answer
343 views

I am using JsonConvert.SerializeObject method to serialize this object: var objx = new JsonObject { ["prob1"] = new JsonObject { ["phone"] = "1019577756", ...
MrMustafa022's user avatar
0 votes
1 answer
661 views

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 ...
BigChief's user avatar
  • 1,545
1 vote
1 answer
579 views

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 ...
Richardissimo's user avatar
0 votes
0 answers
189 views

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 ...
Subhayan's user avatar
0 votes
2 answers
372 views

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 ...
Richardissimo's user avatar
0 votes
1 answer
895 views

Background: I have in the OpenSearch inconsistent data. Sometimes a given property is a string and sometimes it's a list of strings. I don't have a control over that. When using System.Text.Json ...
LilacBlue's user avatar
  • 221
0 votes
2 answers
545 views

I have model classes ClassA and ClassB. These classes are returned as result from two controllers: XController and YController. When returning these classes as result from YController, default ...
markvgti's user avatar
  • 4,629
0 votes
1 answer
337 views

I'm creating a product app in clean architucture, I want to generate json but I cant to do it with JsonSerializable but I cant do it I always get error Could not generate `fromJson` code for `...
Rio's user avatar
  • 13
1 vote
1 answer
302 views

In my project, the server returns the empty object while I have checked that this.taskGateway.RetrieveSelection returns the correct data: [ApiController] public class TaskController : ControllerBase { ...
Takeshi Tokugawa YD's user avatar
0 votes
1 answer
163 views

While working on deserialization of a JSON string that contains HTML data, I noticed the following: < and > are converted to \u003c and \u003e (Direct unicode representation) & is converted ...
Bertram Gilfoyle's user avatar
-2 votes
3 answers
604 views

I have a C# class like the following: public class FunctionCall { public string x {get; set;} public int y {get; set;}; public object obj1 {get; set;}; public object obj2 {get; set;};...
Sergio B.'s user avatar
  • 1,008
1 vote
0 answers
505 views

JDK Jackson has JsonSubTypes which can be based on a field like _type or @type or type etc. In our case we are using _operation. This field is absent from the fields of the deserialized object as it ...
Novaterata's user avatar
  • 4,903
3 votes
2 answers
5k views

How do I write (serialize) a float to JSON with fixed 2 decimals using System.Text.Json? Like {"Amount": 12.30}. Not like {"Amount": 12.3} or {"Amount": 12.3001} or {&...
Tuomas Hietanen's user avatar
-3 votes
1 answer
69 views

I need to serialize java objects for one of my uni projects, but I don't have much experience in java. I was wondering why toJson keeps returning an empty object when I try to print it and why it ...
Rémi-Antoine Joron's user avatar
0 votes
1 answer
77 views

I am not getting "parent" field in response. If I remove @JsonBackReference annotation, the recursion will begin. I need to get parent object 1 time without recursion. @Getter @Setter @...
Muhammad Zohaib's user avatar
1 vote
1 answer
546 views

this is my first post here and for a student project, so I am very sorry if my format of questioning is incorrect. I created a minimal repo and run the build to recreate my error. The Goel is to ...
Chris Harri's user avatar
1 vote
1 answer
481 views

In flutter I have a simple JSON serializable class for a location with just an ID and a name like this: import 'package:json_annotation/json_annotation.dart'; part 'locations_data.g.dart'; @...
MisterMirko's user avatar
3 votes
2 answers
1k views

In Visual Studio 2022, and .NET 7, I created a new project with the template ASP.NET Core Web API. The template creates the WeatherForeCastController, which uses the WeatherForecast model. The ...
Alex's user avatar
  • 561
0 votes
1 answer
446 views

I am trying to use @Expose with an alias name for properties of a class as below but I am getting the response in camelCase. import { Expose } from 'class-transformer'; import { BaseResponse } from './...
girish's user avatar
  • 301
-1 votes
1 answer
64 views

I am trying to properly save/load data containing a generic enum. Currently the object contains a java.lang.Class object (clazz) that get serialized into the field "enumclass". The "al&...
Jacob Batista's user avatar
0 votes
0 answers
449 views

I'm new to hugging face and hugsvision. I'm trying to push a custom Vision Transformer (ViT) model to the Hugging Face Hub. I've defined a custom configuration using ViTConfig, but I get this error ...
Reza's user avatar
  • 1
2 votes
3 answers
986 views

In json_serialization when i use the annotation @JsonKey(required: false), i am able to make a variable nullable, but then i have to annote all variables with this, it there a way to make this this ...
mbakabilal's user avatar
0 votes
1 answer
39 views

I have some data from the bind grid view and I want to display them in a serialized format. Right now I have a nested array where the above parent is serialized correctly but the child array has ...
Salaj Subedi's user avatar
0 votes
1 answer
395 views

I have a data model where several data classes are defined. This data classes are serialized in a Unity project (namely A) and then sent via TCP to another Unity project (B) which acts as a debugging ...
dnorambu 98's user avatar
0 votes
0 answers
39 views

I am having the following UserDto class: part 'user_dto.freezed.dart'; part 'user_dto.g.dart'; @freezed abstract class UserDto implements _$UserDto { const factory UserDto({ required String ...
SRel's user avatar
  • 423
1 vote
1 answer
734 views

I am currently working on a Flutter project where I am trying to create a data class for a User that involves an Image property. In TypeScript, I have a union type Image that can be either a boolean ...
rajput-hemant's user avatar

1
2 3 4 5
7