String str1="{\"v\":[\" \",\"abc\",\"x\",\"abc\"]}";
Map<String, char[]> map = JSON.parseObject(str1,
new com.alibaba.fastjson.TypeReference<Map<String, char[]>>() {
});
System.out.println(new String(map.get("v")));
and then,it outpputs-> [" ","abc","x","abc"]
Is it right?
Actually If the generic is Map
Get this result because:
array.toString().toCharArray()
I think may be the correct generic is Map<String,String[]> or Map<String,char[][]>,the generic Map<String,char[]> is confused.
@wenshao
Your response doesn't make sense. You put in something that is the direct cause of the unexpected behavior of FastJson, which needs to be fixed:
array.toString().toCharArray();
The code above is crappy and doesn't capture the right intention.
While Jackson's behavior is much more appreciated:

This issue is NOT a question, it is a bug report about a misleading behavior of FastJson.
@wenshao
Thanks for taking this one as a bug, it makes me feel much more confortable with my decision of using FastJson as the built-in JSON library for ActFramework
@greenlaw110
Thank you choose fastjson. I will fix this problem in the next version.
@wenshao
Beautiful! Do you think there is any room for taking the issue #777 ?
Most helpful comment
@wenshao
Your response doesn't make sense. You put in something that is the direct cause of the unexpected behavior of FastJson, which needs to be fixed:
The code above is crappy and doesn't capture the right intention.
While Jackson's behavior is much more appreciated:
This issue is NOT a question, it is a bug report about a misleading behavior of FastJson.