mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-21 15:40:58 +00:00
1 line
4.8 KiB
JSON
1 line
4.8 KiB
JSON
[{"user_id": 30494, "stars": [], "topic_id": 36733, "date_created": 1306327794.521364, "message": "how can i do that", "group_id": 236, "id": 1177249}, {"user_id": 30494, "stars": [], "topic_id": 36733, "date_created": 1306327740.8855159, "message": "I want to create a copy of somejson with a different value2", "group_id": 236, "id": 1177243}, {"user_id": 30494, "stars": [], "topic_id": 36733, "date_created": 1306327692.3951311, "message": "let's say I have declared this in a prelude:\nsomejson = { \"key\":{\"subkey\":value, \"subkey2\":value2}};", "group_id": 236, "id": 1177236}, {"user_id": 30494, "stars": [], "topic_id": 36733, "date_created": 1306329410.050209, "message": "method 3 : I guess that if value2 is not a string you need to use value2.encoded() in the replace. Also there might be a problem if there are several occurrences of value2 in the json", "group_id": 236, "id": 1177573}, {"user_id": 30494, "stars": [], "topic_id": 36733, "date_created": 1306330227.8296721, "message": "so I'd suggest :", "group_id": 236, "id": 1177792}, {"user_id": 30462, "stars": [], "topic_id": 36733, "date_created": 1306329067.0018251, "message": "method 3: str=sj1.encode().replace(re/value2/, \"newvalue2\"); sj2=str.decode();", "group_id": 236, "id": 1177469}, {"user_id": 30494, "stars": [], "topic_id": 36733, "date_created": 1306329810.2872159, "message": "method 1 : after having a look at stackoverflow, I'd conclude that it is insanely complex if feasible at all", "group_id": 236, "id": 1177693}, {"user_id": 30494, "stars": [{"date_created": 1306330200.2399521, "user_id": 30462}], "topic_id": 36733, "date_created": 1306330179.7015581, "message": "@rsbohn thank you Randall !! Your knowledge of KRL tricks shows that we probably need a new operator or a function that allows us to do that easily.", "group_id": 236, "id": 1177780}, {"user_id": 30494, "stars": [], "topic_id": 36733, "date_created": 1306328845.0646429, "message": "how do u iterate in krl", "group_id": 236, "id": 1177413}, {"user_id": 30462, "stars": [], "topic_id": 36733, "date_created": 1306328816.4562421, "message": "method 1: iterate over (key,value) copy all but the one you want to change.", "group_id": 236, "id": 1177407}, {"user_id": 30462, "stars": [], "topic_id": 36733, "date_created": 1306328970.3852241, "message": "method 2: remove subkey2, add a new subkey2 -- this may involve sj2=sj1.pick(); sj3=sj2.?remove?()... (yuck?)", "group_id": 236, "id": 1177441}, {"user_id": 30494, "stars": [], "topic_id": 36733, "date_created": 1306329033.2221529, "message": "u said it, there is no remove in KRL", "group_id": 236, "id": 1177457}, {"user_id": 30462, "stars": [], "topic_id": 36733, "date_created": 1306329324.285027, "message": "http://stackoverflow.com/questions/5362965/what-is-the-best-way-to-iterate-over-a-hash-in-krl", "group_id": 236, "id": 1177549}, {"user_id": 30494, "stars": [], "topic_id": 36733, "date_created": 1306330403.472909, "message": "method 4 : bother Sam until he invents some magic json spell", "group_id": 236, "id": 1177842}, {"user_id": 30494, "stars": [], "topic_id": 36733, "date_created": 1306329962.661386, "message": "I won't emphasize that in javascript you do that with one line of code.", "group_id": 236, "id": 1177732}, {"user_id": 30494, "stars": [], "topic_id": 36733, "date_created": 1306331022.0702519, "message": "@edorcutt What does Master Ed think about all this?", "group_id": 236, "id": 1178064}, {"user_id": 4291, "stars": [], "topic_id": 36733, "date_created": 1306337045.7377839, "message": "@loic Need to share Horsty's doc which describes powerful new operators for modifying hash values in place. It makes JSON muck'in so much eazier. I will DM you my email address so that you can contact me via email and I will forward you the docs.", "group_id": 236, "id": 1179624}, {"user_id": 30494, "stars": [], "topic_id": 36733, "date_created": 1306338367.76019, "message": "RT @windley: 55% of APIs released in 2011 support JSON as a data format. Up from 10% in 2006. 20% just support JSON @johnmusser #gluecon", "group_id": 236, "id": 1179822}, {"user_id": 30494, "stars": [], "topic_id": 36733, "date_created": 1306347680.1215551, "message": "http://docs.kynetx.com/docs/Put", "group_id": 236, "id": 1181949}, {"user_id": 30494, "stars": [], "topic_id": 36733, "date_created": 1306347696.768096, "message": "that changes everything", "group_id": 236, "id": 1181962}, {"user_id": 30494, "stars": [], "topic_id": 36733, "date_created": 1306347678.637512, "message": "news docs for put and delete posted by Horsty !", "group_id": 236, "id": 1181948}, {"user_id": 30494, "stars": [], "topic_id": 36733, "date_created": 1306347691.917069, "message": "http://docs.kynetx.com/docs/Delete", "group_id": 236, "id": 1181960}, {"user_id": 30462, "stars": [], "topic_id": 36733, "date_created": 1306349349.1011741, "message": "Wow, documentation. Cool!", "group_id": 236, "id": 1182546}] |