Note that there are some explanatory texts on larger screens.

plurals
  1. PODeserialization of JSON-Value
    primarykey
    data
    text
    <p>I have problems with deserialization of a JSON-Value.</p> <p>Here is my Code:</p> <pre><code>NSDictionary *responseDict = [NSJSONSerialization JSONObjectWithData: data options:0 error: &amp;errorJson]; NSString *innerJson = responseDict[@"d"]; NSMutableDictionary *innerObject = [innerJson JSONValue]; </code></pre> <p>As you can see in the fallowing printscreen (which is taken right after executing the last line of the code above), the items in the dictionary innerObject contains special characters, which are not there in innerJson. Can someone help me, why this occurs?</p> <p><img src="https://i.stack.imgur.com/4Q8ny.png" alt="enter image description here"></p> <p><strong>edit - added Descriptions of the variables from console</strong></p> <p><em>innerJson:</em></p> <pre><code>{"ret" : "1", "msg" : "", "list" : ["Granatapfel¤200g¤1", "Brombeeren¤300g¤1", "Papaya (100 g)¤3¤0", "EPF Müesli 1 Messlöffel¤2¤1", "grüner Spargel (190 g)¤2¤1", "Chicorée (130 g)¤1¤0", "mageres Kalbfleisch (190 g)¤3¤0", "Zander (160 g)¤6¤0", "Bachsaibling (190 g)¤2¤0", "Seeteufel (160 g)¤1¤0", "EPF Guetzli Hafer/\nKartoffel-Dinkel 3 Stk.¤0¤0"]} </code></pre> <p><em>innerObject:</em></p> <pre><code>{ list = ( "Granatapfel\U00a4200g\U00a41", "Brombeeren\U00a4300g\U00a41", "Papaya (100 g)\U00a43\U00a40", "EPF M\U00fcesli 1 Messl\U00f6ffel\U00a42\U00a41", "gr\U00fcner Spargel (190 g)\U00a42\U00a41", "Chicor\U00e9e (130 g)\U00a41\U00a40", "mageres Kalbfleisch (190 g)\U00a43\U00a40", "Zander (160 g)\U00a46\U00a40", "Bachsaibling (190 g)\U00a42\U00a40", "Seeteufel (160 g)\U00a41\U00a40", "EPF Guetzli Hafer/\nKartoffel-Dinkel 3 Stk.\U00a40\U00a40" ); msg = ""; ret = 1; </code></pre> <p>}</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload