Skip to main content
6 events
when toggle format what by license comment
Sep 5, 2017 at 11:39 comment added egmfrs @StephenMuecke Thanks, that's actually the answer I got my code from! I was about to ask you to update your answer before I accepted however I then noticed I hadn't tagged core, hence my comment to supplement it :)
Sep 5, 2017 at 11:30 comment added Stephen Muecke Should have tagged your question with it :) Refer also this answer
Sep 5, 2017 at 11:28 vote accept egmfrs
Sep 5, 2017 at 11:27 comment added egmfrs Very nice, please note for my .net core app I could not use Json.Encode - I had to use Newtonsoft.Json.JsonConvert.SerializeObject.
Sep 5, 2017 at 8:51 comment added Adriano Repetti From a pragmatic point of view I'd agree but formally JSON and JavaScript encodings are different. That means that a valid JSON array of strings may not be a valid JavaScript array of strings. Few examples: \/ isn't a formally valid JS escape sequence and vice-versa \v and \0 aren't valid JSON escape sequences. This issue is mitigated because some browsers apply exactly same escaping rules (at least last time I checked) but it's still not portable and possible cause of errors.
Sep 5, 2017 at 4:52 history answered Stephen Muecke CC BY-SA 3.0