Tagged Questions
5
votes
1answer
413 views
Handling parsing failure in Scala without exceptions
I have a Scala (Play!) application that must get and parse some data in JSON from an external service. I want to be able to gently handle failure in the response format, but it is becoming messy. What ...
3
votes
1answer
189 views
JQuery Promise Interface for a (very) simple JSON Parser
I have written a parser function that returns a JQuery Promise. You can see from the code that this is the top level parser and it delegates out to two other more specific parsers.
At the minute it ...
3
votes
2answers
186 views
QJson: Yet another Json parser and serializer for Qt, but with additional features
I wrote QJson, a utility class in/for Qt, I need you to take a look at. It is both a JSON parser and serializer, but with extended funcionality (going beyond the JSON specification) (see first ...
1
vote
1answer
4k views
Android: Optimize JSON insertion to SQLite (insert … on duplicate key ignore)
In current task, I'm refactoring the code of converting JSON file into SQLite database on Android device. Code compliant with Java 6.
As od benchmark, grabbing the code from remote server takes ~1 ...
3
votes
2answers
2k views
Parsing JSON with JavaScript
I need to write some JavaScript code that will take a JSON string, parse it, and return the names of the most-deeply nested properties. For example, for this input:
var json =
"{\
foo: {\
bar: ...
3
votes
1answer
152 views
Substitution of different occurrences of a string with changing patterns
I need to parse an invalid JSON string in which I find many repetitions of the same key, like the following snippet:
[...]
"term" : {"Entry" : "value1", [.. other data ..]},
"term" : {"Entry" : ...