Questions Tagged [Fastjson]

A fast JSON parser/generator for Java, or a smallest, fastest polymorphic JSON serializer for C#.

23 questions with no upvoted or accepted answers
2 votes
0 answers
580 views

fastjson can't correctly transfer complex object or the cast I use is wrong?

fastjson can't correctly transfer complex object or the cast I use is wrong. I find a question in my project.so write a test like this: import com.alibaba.fastjson.JSONObject; import java.io....
  • 1,511
1 vote
0 answers
165 views

change values during Jackson serialization, like ValueFileter for fastjson

When I serialize a string value if it's too long, I want to change it to another value. If use FastJSON, you can use ValueFilter do it. String jsonStr = "{\"key1\":\"...
1 vote
0 answers
97 views

How to deserialize a list to a map using fastmap

I have a JSON that has a list of objects inside another object, something like: { "name":"name", "processes":[ { "id":123, "...
  • 187
1 vote
2 answers
264 views

Deserialized part data using fastJSON fail

I want deserialized part data using fastJSON fail. class A { public String a; } The data {"a": "a", "b": "b" } Use A objectA = JSON.parseObject(data, A.class) get objectA, but the field ...
  • 329
1 vote
1 answer
2k views

How to ignore params when `parseObject` in fastjson?

I use the fastjson to deal with the JSON. When I was trying to derialize the JSON string to a bean, I got an exception. I debuged into the code and find out there was something wrong with a param when ...
  • 2,027
1 vote
0 answers
231 views

fastJSON exception 'Serializer encountered maximum depth of 20'

I'm using fastjson to serialize an object before I pass it back from my controller to my $.post call in javascript, but I'm getting this error and I don't know why. The exception is being thrown when ...
  • 13.8k
1 vote
0 answers
505 views

How do I use the deserialized data using fastJSON?

I've got this code that retrieves json data from a WebAPI method and then puts it in a string: const string uri = ""; var webRequest = (HttpWebRequest)WebRequest....
0 votes
0 answers
25 views

Including fast-json in the Java agent has affected the normal serialization process of the application using fast-json

In the Java-agent I implemented, after introducing the following dependencies: <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</...
0 votes
0 answers
74 views

dubbo use fastjson2 Serialize error autotype not support

java.io.IOException: org.apache.dubbo.common.serialize.SerializationException: com.alibaba.fastjson2.JSONException: auotype not support when provider return a generics dto,the server throw this ...
0 votes
0 answers
81 views

Why can't this text be parsed through fastjson2?

import com.alibaba.fastjson2.JSONArray JSONArray.parseArray(str).toString() I use the toString method of fastjson2 to parse this JSON string, but I will encounter an error: Caused by: java.lang....
0 votes
0 answers
479 views

Parse map like json string into class by fastjson/jackson

Consider a json: { "data": { "key1": { "t1":"text1", "t2":"text1", }, "key2": { "t1":&...
0 votes
1 answer
777 views

De-serializing Exception with FastJSON: Can not set field to java.lang.Exception

I'm using FastJSON to serialize and de-serialize some classes. However, I've found a combination that doesn't work: An exception that contains holds a reference to an object from another class cannot ...
0 votes
1 answer
503 views

How to parse json to an object extends HashMap use fastjson in java?

I have a json, two custom beans, one of which extends HashMap. While I use com.alibaba.fastjson.JSON to parse json into the object extends HashMap and call the get method, it will get a ...
  • 293
0 votes
1 answer
36 views

Why is fastJSON deserialisation complete in unit test but one property and its properties not populated when live?

I have a very weird situation which I am finding impossible to resolve, so any guidance would be much appreciated. I am retrieving the results of a VAT Number Search from HMRC via their API, and it is ...
0 votes
2 answers
751 views

Fastjson deserialize returns null

This is the json file:{"Type": "File", "File_Name": "tempfile.fasttext", "File_Size": 15} i use Fastjson to deserialize it and show the items..but public static void deserializejson(String json){ ...

15 30 50 per page
Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest