search for: json_str

Displaying 3 results from an estimated 3 matches for "json_str".

Did you mean: json_dir
2012 Jun 19
1
need help with unlist(), losing NULL values
Hi, I have a very rudimentary kind of question on using unlist(). I am parsing a bunch of JSON text using rjson package. Some data elements in a dictionary happen to be null which rjson parses correctly. > fromJSON(json_str='{"query":{"A":10, "B":null, "C":"hello"}, "query":{"A":20, "B":null, "C":"hello again"}}') $query $query$A [1] 10 $query$B NULL $query$C [1] "hello" $query $query$A [1] 20 $q...
2011 Jun 15
12
Create or Update Model with JSON?
Having issue updating a model with JSON. I simply *"model.attributes=json"*, which does update the attributes but not the id, or uuid in this case. I want to save or create the record (if it''s id exists). Seems like this would be documented, but I''m not finding anything. I''m using a MOM to pass JSON between apps. Thanks. -- You received this message because
2011 Aug 25
7
How to safely embed JSON object in HTML document
...tag1","color":"green"},{"name":"&lt;/ script&gt;&lt;b&gt;I can do something bad here&lt;/ b&gt;","color":"red"}]; I thought about storing JSON string in a <script type="application/ json" id="json_string"> tag, and then doing something like $.parseJSON($("#json_string").html()) but that also has the same problem of escaping, like in the above example. Is there any easy (Rails) way to do that? Or am I doing it wrong to begin with? Cheers! -- You received this message beca...