Questions tagged [json-serialization]
302 questions
0
votes
0 answers
Cannot figure out why Error is always turning out to be 'nil'
I am creating an Event Manager App, It requires to input valid Event Code to check the Event Details. I am working on the Sign in page where in the user will input the event code. When the page is error free, I tried to clean, build and run the app,…

pchocoios
- 55
- 11
0
votes
1 answer
Java Serialization with respect to different Contexts
I am little confused with respect to Serialization as to what it mean with respect to different contexts.
Serialization as I understand (simple terms) -> Converting the object to a form wherein it can be transferred to network / storage.
Now, i was…

CuriousMind
- 8,301
- 22
- 65
- 134
0
votes
4 answers
Accessing JSON data with Swift
I have an array of JSON data from the following call:
guard let json = (try? JSONSerialization.jsonObject(with: content, options: JSONSerialization.ReadingOptions.mutableContainers)) as? [Any] else {
print("Not containing JSON")
return
}
when I run…

Jacobi
- 21
- 1
- 6
0
votes
1 answer
How can I bind model in ASP.NET MVC CORE with special attributes
In our project there is a code style that force us to use model with property name like camelcase-style
public class MyModelClass {
public int CountryId { get; set; }
public int CountryName { get; set; }
}
But service, that invoke out…

Rashid Khaziev
- 97
- 1
- 8
0
votes
0 answers
System.NotSupportedException: No data is available for encoding 65001
I have a python script making GET request using aiohttp by 10 threads simultaneously, webservice is implemented by ASP.NET Web API. I got about five 500 errors after 100000 calls for the same data(same url), the
following is the error message.…

Henrik
- 123
- 1
- 2
- 10
0
votes
2 answers
How to create C# class from json null object
I am calling API and get this response from the API.
{
"StringValue": "Hi Developers",
"TestMessage": {
"": [
"Enjoy Coding."
]
}
}
This is how I tried to make my C# class.
public class MyClass
{
public…

Deep Soni
- 431
- 4
- 24
0
votes
1 answer
JsonIgnore attribute is not working for one property of an ASP.NET MVC entity
I have a simple entity like this in my ASP.NET MVC project:
public class Folder : EntityData
{
public Folder()
{
IsStub = false;
}
[StringLength(300)]
public string Name { get; set; }
[JsonIgnore]
public bool…

Cristiano Ghersi
- 1,944
- 1
- 20
- 46
0
votes
2 answers
DSL-JSON: java.io.IOException: Unable to serialize provided object. Failed to find serializer for: class
I'm trying to use DSL-JSON running one of the examples.
I'm getting the following error:
Exception in thread "main" java.io.IOException: Unable to serialize provided object. Failed to find serializer for: class dsl.test.Example$Model
at…

Alessandro C
- 3,310
- 9
- 46
- 82
0
votes
1 answer
Is it possible to skip object name during Json Serialization?
I have the below properties of an object:
public string SenderAccount { get; set; }
public string ReceiverAccount { get; set; }
public decimal Amount { get; set; }
public string Currency { get; set; }
public Info Info { get; set; }
And I want to…

Tecno
- 65
- 1
- 7
0
votes
1 answer
JSON format for maintaining array sorting
I need a JSON expert here or someone who knows JSON very well. I have the following JSON structure that I received from an API via http request. The API pre-sorts the data by itemDistance because I specified that in my query. When I receive the…

user4956810
- 23
- 4
0
votes
1 answer
How to select class for collection member in fasterxml JSON conversion
In my REST application I am using fasterxml to serialize and deserialize POJOs to JSON. I run into problems with collections such as List in a case like this.
public class JsonRequest {
public int anumber;
public String astring;
public…

AlanObject
- 9,613
- 19
- 86
- 142
0
votes
2 answers
How to JSON Serialize Nested Collections in TypeScript
I am trying to serializing list to Json using TypeScirp but I couldn't find way to handle complex nested collection . Please be kind enough to show some light.
Below is the sample structure I am trying to convert.
[
{
"method":…

Lalindu
- 329
- 3
- 17
0
votes
1 answer
Halarious - Embedded resource field names not being converted with custom naming strategy
I am using the HAL-Specification framework:
https://github.com/surech/halarious
http://confluence.surech.ch/display/HAL/halarious+Home
http://stateless.co/hal_specification.html
It appears that embedded resource field names are not being converted…

Josef P.
- 245
- 1
- 12
0
votes
1 answer
Convert object to JSON in serverside JavaScript aspx
My application uses serverside JavaScript in aspx files on IIS 8 (Windows 2012R2) .
I want to convert a javascript hash to JSON.
My file test.aspx:
<%@language="javascript" Debug="true"%>
<%
var serializer = new…

Jeff
- 736
- 5
- 14
-1
votes
1 answer
How to fix @JsonKey object null in @JsonSerializable?
Unhandled Exception: type 'Null' is not a subtype of type 'Map' in type cast,
import 'package:json_annotation/json_annotation.dart';
part 'jump.g.dart';
@JsonSerializable()
class Jump extends Object {
@JsonKey(name: 'des',…