-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
{
"Aa" :
{" a1 ":" aa11, "
"A2" : "https:\/\/www.abc.com \/asfasd8asfad
"},
"Bb" : "bbbbbbbbbasdfasdxxx}
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
If JAVA use a dictionary can get two keys, aa and bb. Aa to string value and JSON originally,
Is this:
{" a1 ":" aa11, "
"A2" : "https:\/\/www.abc.com \/asfasd8asfad
"}
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
But I use c # language in the same way to get the key values of aa and bb, bb is the same string, this need not speak,
But the value of aa is this:
{" a1 ":" aa11, "
"A2" : "https://www.abc.com/asfasd8asfad"
}
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Want to know how to get the original data, use a dictionary, do not escape, because I don't know if it is only the character escaping, so must want to know the solution,
My c # code is as follows:
Dictionary
Because when it is turned off, the data can't turn back, behind
Not even if I add the parameter
JsonSerializerOptions jso=new JsonSerializerOptions ()
{
Encoder=JavaScriptEncoder UnsafeRelaxedJsonEscaping,//solve Chinese garbled - not escape Unicode data
IgnoreNullValues=true,//to null
};
This plus also not line,
Is actually a word, don't escape the JSON object into character; [remind is a JSON object is not string aa]
I want to get the data "https:\/\/www.abc.com \/asfasd8asfad
"Not to get "https://www.abc.com/asfasd8asfad"
CodePudding user response:
How do you confirm "raw data"? If the original data is inside \/so never considered a/c #, only may be your c # to achieve string strData code was wrong,CodePudding user response:
Post your screenshot, see you how, in what debug window to determine the "raw data"?CodePudding user response: