mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-05 23:20:19 +00:00
1 line
1.3 KiB
JSON
1 line
1.3 KiB
JSON
[{"user_id": 2169, "stars": [], "topic_id": 16634, "date_created": 1301623582.3572061, "message": "Like the title says, working with the facebook graph api, some calls return strings that are not JSON. Any way I can detect this?", "group_id": 292, "id": 498530}, {"user_id": 218, "stars": [], "topic_id": 16634, "date_created": 1301625368.3300231, "message": "yes.", "group_id": 292, "id": 498702}, {"user_id": 1736, "stars": [], "topic_id": 16634, "date_created": 1301624132.4743309, "message": "json.loads will raise a ValueError", "group_id": 292, "id": 498583}, {"user_id": 218, "stars": [], "topic_id": 16634, "date_created": 1301625386.2190681, "message": "except ValueError: print \"its not json\"", "group_id": 292, "id": 498705}, {"user_id": 2169, "stars": [], "topic_id": 16634, "date_created": 1301625073.3004251, "message": "I'm new to this. Is that a typical way to set this up. Just except a ValueError?", "group_id": 292, "id": 498666}, {"user_id": 218, "stars": [], "topic_id": 16634, "date_created": 1301625379.53285, "message": "try: simplejson.loads(my_string)", "group_id": 292, "id": 498704}, {"user_id": 7781, "stars": [], "topic_id": 16634, "date_created": 1301635642.961771, "message": "Agreed, the easiest way is to try to deserialise it and catch the error on fail.", "group_id": 292, "id": 499681}] |