In the configuration of the object onetomany bidirectional, how to avoid json dead cycle
It is in the conversion of json data into json data when the time of the error, due to the bidirectional correlation, so the conversion of json data is endless, there is no what annotations can be prevented to the feedback object will be converted to json data
What should I do with json data parsing errors?
JSON data parsing errors are handled as follows:
-JSONValuefailed.Erroris:Unescapedcontrolcharacter[0x0D]
This error is the JSON parsing of String when the escape character.
Apply stringByReplacingOccurrencesOfString:@”\r “withString:@”” in NSString to cancel the escape character and it will be OK!
NSString *json_string1=[json_string stringByReplacingOccurrencesOfString:@”\r “withString:@””];
Or the code generated by the online tool. code, which isn’t guaranteed to be 100% accurate.
Two way association in hibernate with json produces a dead loop, how to solve
You have a problem I once encountered, put me trapped me for two days. Put a store more than one entity list into the json, because the stored entities with hibernate and other entities between the association relationship, so will report a dead loop error. With your approach, it’s true that it doesn’t report an error, but then you can’t actually fetch the filtered values on the client side. I ended up using this
js parsing json string error reporting solution (json string with escape characters)
Scenario: the data requested back from the backend has a string in json format, which needs to be processed into a json object before it can be manipulated.
JSON.parse():
Use the JSON.parse method to parse a json string.
Error: UncaughtSyntaxError:Unexpectedtoken}inJSONatposition30
UncaughtSyntaxError:Unexpectedtoken’ inJSONatposition1
This error is due to a problem with the formatting of the json string, where you can’t add a ‘,’ comma after the last element of the object. For example, ‘{“name”: “cxh”, “sex”: “man”,}’ using JSON.parse() will report an error, and key-value pairs in the json string need to be caused by double quotes.
Solution: use eval()()
Error: SyntaxError:UnexpectedtokeneinJSONatposition1
This error is reported due to the request coming back with escaped characters in the json.
Solution: json strings with escape characters use json
json data using JSON.parse() There are browsers that are not compatible with JSON as an object, or there are some that have things in them that can’t be parsed by JSON.parse, so for the time being, it’s better to use :eval(“(“+” data+”)”)
This error is reported because of the request coming back with json with escape characters. data+”)”);
json source data characters have escapes should be necessary, you have to see if there are redundant escapes after parsing out
json to string JSON.stringify overall effect can be:
leading 0 and decimal point error: SyntaxError. JSON.parse:expected’,’or’}’afterpropertyvalue
SyntaxError:JSON.parse:unterminatedfractionalnumber
UncaughtSyntaxError:UnexpectednumberinJSONatposition25
UncaughtSyntaxError:Unexpectedtoken}inJSONatposition26
< /p>
Numbers can’t start with 0, like 01, and your decimal point must be followed by at least one digit.