- java.lang.Object
-
- com.github.wnameless.json.base.GsonJsonCore
-
- All Implemented Interfaces:
JsonCore<GsonJsonValue>
public class GsonJsonCore extends Object implements JsonCore<GsonJsonValue>
The GSON implementation ofJsonCore.- Author:
- Wei-Ming Wu
-
-
Constructor Summary
Constructors Constructor Description GsonJsonCore()GsonJsonCore(com.google.gson.Gson gson)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GsonJsonValueparse(Reader jsonReader)Creates aJsonValueCoreby given JSON string reader.GsonJsonValueparse(String json)Creates aJsonValueCoreby given JSON string.
-
-
-
Method Detail
-
parse
public GsonJsonValue parse(String json)
Description copied from interface:JsonCoreCreates aJsonValueCoreby given JSON string.- Specified by:
parsein interfaceJsonCore<GsonJsonValue>- Parameters:
json- any JSON string- Returns:
- a
JsonValueCore
-
parse
public GsonJsonValue parse(Reader jsonReader) throws IOException
Description copied from interface:JsonCoreCreates aJsonValueCoreby given JSON string reader.- Specified by:
parsein interfaceJsonCore<GsonJsonValue>- Parameters:
jsonReader- any JSON string reader- Returns:
- a
JsonValueCore - Throws:
IOException- if error occurs during reading
-
-