🌐
GitHub
github.com › google › gson › blob › main › gson › src › main › java › com › google › gson › JsonParser.java
gson/gson/src/main/java/com/google/gson/JsonParser.java at main · google/gson
import com.google.gson.stream.MalformedJsonException; import java.io.IOException; import java.io.Reader; import java.io.StringReader; · /** * A parser to parse JSON into a parse tree of {@link JsonElement}s. * * <p>The JSON data is parsed in {@linkplain JsonReader#setStrictness(Strictness) ...
Author   google
🌐
GitHub
google.github.io › gson › UserGuide.html
Gson User Guide | gson
Use Gson’s parser API (low-level streaming parser or the DOM parser JsonParser) to parse the array elements and then use Gson.fromJson() on each of the array elements.This is the preferred approach. Here is an example that demonstrates how to do this. Register a type adapter for Collection.class that looks at each of the array members and maps them to appropriate objects.
🌐
GitHub
github.com › google › gson › issues › 1208
Why is the JsonParser always lenient? · Issue #1208 · google/gson
August 27, 2017 - See this line: gson/gson/src/main/java/com/google/gson/JsonParser.java Line 82 in 6b20e3a json.setLenient(true); It basically makes the JsonReader.setLenient() API useless. How can we make the parser strict? For reference this is for htt...
Author   xfxyjwf
🌐
GitHub
github.com › google › gson › pull › 2123
Improve Gson and JsonParser trailing data handling by Marcono1234 · Pull Request #2123 · google/gson
Improves the trailing data handling for Gson and JsonParser, mainly addressing the following issues: The old code was not detecting trailing data after a JSON null, e.g. null[], because it erroneo...
Author   google
🌐
GitHub
github.com › immutables › immutables › blob › master › gson › src › org › immutables › gson › stream › JsonParserReader.java
immutables/gson/src/org/immutables/gson/stream/JsonParserReader.java at master · immutables/immutables
package org.immutables.gson.stream; · import com.fasterxml.jackson.core.JsonLocation; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonStreamContext; import com.fasterxml.jackson.databind.util.TokenBuffer; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonToken; import java.io.IOException; import java.io.Reader; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; import javax.annotation.Nullable; import javax.annotation.concurrent.NotThreadSafe; import static com.fasterxml.jackson.core.JsonToken.*; ·
Author   immutables
🌐
GitHub
github.com › reposense › RepoSense › blob › master › src › main › java › reposense › parser › JsonParser.java
RepoSense/src/main/java/reposense/parser/JsonParser.java at master · reposense/RepoSense
import com.google.gson.stream.JsonReader; · /** * Represents a json parser that is able to parse json file from a {@link Path} into an object of type {@code T}. */ public abstract class JsonParser<T> { · /** * Gets the type of {@code T} for json conversion.
Author   reposense
🌐
GitHub
github.com › google › gson › blob › main › gson › src › test › java › com › google › gson › JsonParserTest.java
gson/gson/src/test/java/com/google/gson/JsonParserTest.java at main · google/gson
JsonElement e = JsonParser.parseReader(reader); assertThat(e.isJsonObject()).isTrue(); assertThat(e.getAsJsonObject().get("a").getAsInt()).isEqualTo(10); assertThat(e.getAsJsonObject().get("b").getAsString()).isEqualTo("c"); } · @Test · public void testReadWriteTwoObjects() throws Exception { Gson gson = new Gson(); CharArrayWriter writer = new CharArrayWriter(); BagOfPrimitives expectedOne = new BagOfPrimitives(1, 1, true, "one"); writer.write(gson.toJson(expectedOne).toCharArray()); BagOfPrimitives expectedTwo = new BagOfPrimitives(2, 2, false, "two"); writer.write(gson.toJson(expectedTwo).toCharArray()); CharArrayReader reader = new CharArrayReader(writer.toCharArray()); ·
Author   google
🌐
GitHub
google.github.io › gson › CHANGELOG.html
Change Log | gson
Fixed OSGi metadata generation to work on JavaSE < 9 (https://github.com/google/gson/pull/1603). ... Added static methods JsonParser.parseString and JsonParser.parseReader and deprecated instance method JsonParser.parse
🌐
GitHub
github.com › dynastymasra › JsonParser
GitHub - dynastymasra/JsonParser: Parsing JSON data in Android with GSON and Spring Framework
Parsing JSON data in Android with GSON and Spring Framework - dynastymasra/JsonParser
Author   dynastymasra
🌐
GitHub
github.com › google › gson › blob › main › UserGuide.md
gson/UserGuide.md at main · google/gson
A Java serialization/deserialization library to convert Java Objects into JSON and back - gson/UserGuide.md at main · google/gson
Author   google
Find elsewhere
🌐
GitHub
github.com › topics › jsonparser
jsonparser · GitHub Topics · GitHub
kotlin dynamic clean-code kotlin-android clean-architecture viewmodel-pattern livedata architecture-components jsonparser lazy-loading-tabs ... Allows you to map two classes for you. It uses the Gson library in doing this.
🌐
GitHub
github.com › google › gson
GitHub - google/gson: A Java serialization/deserialization library to convert Java Objects into JSON and back · GitHub
A Java serialization/deserialization library to convert Java Objects into JSON and back - google/gson
Starred by 24.3K users
Forked by 4.4K users
Languages   Java
🌐
GitHub
github.com › google › gson › issues › 475
jsonparser performance · Issue #475 · google/gson
March 19, 2015 - What i have done so far is to use a JsonReader reader = new JsonReader(in) and then write a simple recursive function (taht is 90% equals to what you do when you use the jsonreader) to parse the three (do some peek, switch case, make it recursive and so on) everything work like a charm, and is quite fast. i have than take a look to json-smart v2 (newer ersion , used only as a parser, and is 20% fast than gson 2.2.2 (never version) parser here are some example gsonParser 5009ms jsonSMART 3633ms this is done with a huge json, iterated 20000 times x 10 repetition each (to allow a bit of warmup) a
Author   GoogleCodeExporter
🌐
GitHub
gist.github.com › mithuns › 668d5f15eafe2a0f8ba73f0783225cb3
Gson parsing sample code · GitHub
Gson parsing sample code. GitHub Gist: instantly share code, notes, and snippets.
🌐
GitHub
github.com › muditsen › JsonParser
GitHub - muditsen/JsonParser: To parse and convert a Java Model file to Json Object and vice versa
To parse and convert a Java Model file to Json Object and vice versa. This is very light version of Gson provided by google. May contain some bugs too. The project is really easy to understand and explaining the use of annotations in java. Add JsonParser and JsonKey file to your project.
Author   muditsen
🌐
GitHub
github.com › mooqoo › Gson-Json
GitHub - mooqoo/Gson-Json: An Android sample code that implements google's gson library
An Android sample code that convert data between json and java object using both Android's JSONObject and Google's gson.
Author   mooqoo
🌐
GitHub
gist.github.com › madonnelly › 1371597
Converting a file to JsonObject with GSON · GitHub
September 21, 2024 - Converting a file to JsonObject with GSON. GitHub Gist: instantly share code, notes, and snippets.
🌐
GitHub
github.com › sulakshanasingh › JSONParser › tree › master
GitHub - sulakshanasingh/JSONParser: Jackson vs Gson
Jackson vs Gson. Contribute to sulakshanasingh/JSONParser development by creating an account on GitHub.
Author   sulakshanasingh
🌐
GitHub
github.com › filosganga › geogson
GitHub - filosganga/geogson: GeoJSON support for Google gson library · GitHub
GeoJSON support for Google gson library. Contribute to filosganga/geogson development by creating an account on GitHub.
Starred by 71 users
Forked by 27 users
Languages   Java 99.6% | Shell 0.4%