Tagged Questions
3
votes
1answer
9k views
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 a benchmark, grabbing the code from remote server takes ...
4
votes
1answer
205 views
Finding potential thread safety issues and race conditions in my multithreading code
I am working on a project in which I have two tables in a different database with different schemas. So that means I have two different connection parameters for those two tables to connect using ...
6
votes
1answer
235 views
Populate views in Android application
I wrote these classes and I would like to know if this is a correct way. I created a new Project with Blank activity and "Scrollable Tabs + Swipe" as Navigation type.
My main activity:
...
0
votes
1answer
85 views
Android export browser history as JSON
I wrote a simple android app to export the browsers history as JSON, but I do not know if the resulting JSON is a format that the user will easily be able to parse and use.
Is there any way that i ...
2
votes
1answer
767 views
Is this an efficient way of shuffling a JSON array in Java?
This is my first question here so I hope I don't break the protocol too much. I originally posted this question on Stack Overflow.
Since I did not get a satisfactory answer (and I really needed to ...
3
votes
1answer
493 views
Parsing JSON from file in Java [closed]
This is a quick question. I am reading a mass amount of JSON from a variety of text files. The JSONs are tweets, in this format:
...
2
votes
1answer
201 views
2
votes
1answer
104 views
Json whitespace formatter
I couldn't quickly find Java code with googling to make serialized Json easier to read (this is a debugging library, obviously implementation code wouldn't use this as it's just more characters). This ...
1
vote
2answers
594 views
Simple JSON writer
I am working on a way to quickly build JSON strings in Java. To this end, I have created the following two files. Assuming that I do not need to parse JSON strings for Java, is this an efficient ...
1
vote
0answers
152 views
How to add faster object to an array [duplicate]
I have a list with contentlets and want all languages from every contentlet (I get these with the method languageAPI.getAllValuesByKey(key , contentList). I get a ...
6
votes
2answers
455 views
Check if a value exists or catch an exception
I am parsing a response from server, and in case it contains the fields "chunk_number"(J_ID_CHUNK_NUMBER) and "total_chunk_number"(...
3
votes
1answer
3k views
Is there another way / proper way of parsing this JSON array ?
I have a JSON object which holds some json_array like this: (with org.codehaus.jettison.json.*)
...