Actually the second thing. No it does not. Using the following code, results in _normal_ results as one would expect from some json data.
- $something['something else']=array(0,3,4,5);
$something['something2']=array(4,2,1,'37');
$something['some dogy thing']=array('23','some',37);
echo json_encode($something);
$handler=fopen('tester.txt','w+');
fwrite($handler,json_encode($something));
fclose($handler);
And when I open the file tester.txt, guess what. Non-escaped. So please, please do explain how this is happening, since I clearly cannot see it.
And the JSON is _never_ escaped. I have no idea where you're getting that from either. Firefox, Chromium both state that it's non-escaped. It's just as it should be. It's stored as the following.
- "{"something else":[0,3,4,5],"something2":[4,2,1,"37"],"some dogy thing":["23","some",37]}"
The last thing is, why wouldn't I? HTML5 data object isn't yet standardized across all browsers yet. And thus localStorage is the best thing that there is to be able to be used on the most browsers.
I've had no troubles with it, so long as I wasn't using jquery's formatting. It's _jquery_ escaping it. Since it's the only time that the data is changed from the above. The localStorage area states that it is the same in firefox and chromium. If I use jquery, it's the same thing again. It's jquery somehow(for wahtever reason) escaping my JSON data. I cannot use it, either by stringifying it or just using it as a multi-level array type of thing. Like var a="{"something else":[0,3,4,5],"something2":[4,2,1,"37"],"some dogy thing":["23","some",37]} and then doing. a['something else'][0]. When ran through jquery, it's going to say undefined. but If i just echo it out, it's seen as value '0'.