Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 53 additions & 53 deletions src/main/java/io/synadia/json/JsonParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.util.Map;

/**
* Class that can parse json to a JsonValue
* Class that can parse JSON to a JsonValue
*/
public class JsonParser {

Expand All @@ -40,8 +40,8 @@ public enum Option {
}

/**
* Parse Json from a char array
* @param json the json
* Parse JSON from a char array
* @param json the JSON
* @return the JsonValue
* @throws JsonParseException if there is a problem parsing
*/
Expand All @@ -51,8 +51,8 @@ public static JsonValue parse(char @Nullable [] json) throws JsonParseException
}

/**
* Parse Json from a char array, starting at the index
* @param json the json
* Parse JSON from a char array, starting at the index
* @param json the JSON
* @param startIndex the starting index in the array
* @return the JsonValue
* @throws JsonParseException if there is a problem parsing
Expand All @@ -63,8 +63,8 @@ public static JsonValue parse(char @Nullable [] json, int startIndex) throws Jso
}

/**
* Parse Json from a char array
* @param json the json
* Parse JSON from a char array
* @param json the JSON
* @param options options for how to parse
* @return the JsonValue
* @throws JsonParseException if there is a problem parsing
Expand All @@ -75,8 +75,8 @@ public static JsonValue parse(char @Nullable [] json, @Nullable Option... option
}

/**
* Parse Json from a char array
* @param json the json
* Parse JSON from a char array
* @param json the JSON
* @param startIndex the starting index in the array
* @param options options for how to parse
* @return the JsonValue
Expand All @@ -89,8 +89,8 @@ public static JsonValue parse(char @Nullable [] json, int startIndex, @Nullable


/**
* Parse Json from a String
* @param json the json
* Parse JSON from a String
* @param json the JSON
* @return the JsonValue
* @throws JsonParseException if there is a problem parsing
*/
Expand All @@ -101,8 +101,8 @@ public static JsonValue parse(String json) throws JsonParseException {


/**
* Parse Json from a String
* @param json the json
* Parse JSON from a String
* @param json the JSON
* @param startIndex the starting index in the string
* @return the JsonValue
* @throws JsonParseException if there is a problem parsing
Expand All @@ -113,8 +113,8 @@ public static JsonValue parse(String json, int startIndex) throws JsonParseExcep
}

/**
* Parse Json from a String
* @param json the json
* Parse JSON from a String
* @param json the JSON
* @param options options for how to parse
* @return the JsonValue
* @throws JsonParseException if there is a problem parsing
Expand All @@ -125,8 +125,8 @@ public static JsonValue parse(String json, @Nullable Option... options) throws J
}

/**
* Parse Json from a String
* @param json the json
* Parse JSON from a String
* @param json the JSON
* @param startIndex the starting index in the array
* @param options options for how to parse
* @return the JsonValue
Expand All @@ -138,8 +138,8 @@ public static JsonValue parse(String json, int startIndex, @Nullable Option... o
}

/**
* Parse Json from a byte array
* @param json the json
* Parse JSON from a byte array
* @param json the JSON
* @return the JsonValue
* @throws JsonParseException if there is a problem parsing
*/
Expand All @@ -149,8 +149,8 @@ public static JsonValue parse(byte[] json) throws JsonParseException {
}

/**
* Parse Json from a byte array
* @param json the json
* Parse JSON from a byte array
* @param json the JSON
* @param startIndex the starting index in the array
* @return the JsonValue
* @throws JsonParseException if there is a problem parsing
Expand All @@ -161,8 +161,8 @@ public static JsonValue parse(byte[] json, int startIndex) throws JsonParseExcep
}

/**
* Parse Json from a byte array
* @param json the json
* Parse JSON from a byte array
* @param json the JSON
* @param options options for how to parse
* @return the JsonValue
* @throws JsonParseException if there is a problem parsing
Expand All @@ -173,8 +173,8 @@ public static JsonValue parse(byte[] json, @Nullable Option... options) throws J
}

/**
* Parse Json from a byte array
* @param json the json
* Parse JSON from a byte array
* @param json the JSON
* @param startIndex the starting index in the array
* @param options options for how to parse
* @return the JsonValue
Expand All @@ -186,8 +186,8 @@ public static JsonValue parse(byte[] json, int startIndex, @Nullable Option... o
}

/**
* Parse Json from a char array
* @param json the json
* Parse JSON from a char array
* @param json the JSON
* @return the JsonValue
* @throws RuntimeException if there is a problem parsing
*/
Expand All @@ -198,8 +198,8 @@ public static JsonValue parseUnchecked(char @Nullable [] json) {
}

/**
* Parse Json from a char array
* @param json the json
* Parse JSON from a char array
* @param json the JSON
* @param startIndex the starting index in the array
* @return the JsonValue
* @throws RuntimeException if there is a problem parsing
Expand All @@ -211,8 +211,8 @@ public static JsonValue parseUnchecked(char @Nullable [] json, int startIndex) {
}

/**
* Parse Json from a char array
* @param json the json
* Parse JSON from a char array
* @param json the JSON
* @param options options for how to parse
* @return the JsonValue
* @throws RuntimeException if there is a problem parsing
Expand All @@ -224,8 +224,8 @@ public static JsonValue parseUnchecked(char @Nullable [] json, @Nullable Option.
}

/**
* Parse Json from a char array
* @param json the json
* Parse JSON from a char array
* @param json the JSON
* @param startIndex the starting index in the array
* @param options options for how to parse
* @return the JsonValue
Expand All @@ -238,8 +238,8 @@ public static JsonValue parseUnchecked(char @Nullable [] json, int startIndex, @
}

/**
* Parse Json from a String
* @param json the json
* Parse JSON from a String
* @param json the JSON
* @return the JsonValue
* @throws RuntimeException if there is a problem parsing
*/
Expand All @@ -250,8 +250,8 @@ public static JsonValue parseUnchecked(String json) {
}

/**
* Parse Json from a String
* @param json the json
* Parse JSON from a String
* @param json the JSON
* @param startIndex the starting index in the string
* @return the JsonValue
* @throws RuntimeException if there is a problem parsing
Expand All @@ -263,8 +263,8 @@ public static JsonValue parseUnchecked(String json, int startIndex) {
}

/**
* Parse Json from a String
* @param json the json
* Parse JSON from a String
* @param json the JSON
* @param options options for how to parse
* @return the JsonValue
* @throws RuntimeException if there is a problem parsing
Expand All @@ -276,8 +276,8 @@ public static JsonValue parseUnchecked(String json, @Nullable Option... options)
}

/**
* Parse Json from a String
* @param json the json
* Parse JSON from a String
* @param json the JSON
* @param startIndex the starting index in the string
* @param options options for how to parse
* @return the JsonValue
Expand All @@ -290,8 +290,8 @@ public static JsonValue parseUnchecked(String json, int startIndex, @Nullable Op
}

/**
* Parse Json from a byte array
* @param json the json
* Parse JSON from a byte array
* @param json the JSON
* @return the JsonValue
* @throws RuntimeException if there is a problem parsing
*/
Expand All @@ -302,8 +302,8 @@ public static JsonValue parseUnchecked(byte[] json) {
}

/**
* Parse Json from a byte array
* @param json the json
* Parse JSON from a byte array
* @param json the JSON
* @param startIndex the starting index in the array
* @return the JsonValue
* @throws RuntimeException if there is a problem parsing
Expand All @@ -315,8 +315,8 @@ public static JsonValue parseUnchecked(byte[] json, int startIndex) {
}

/**
* Parse Json from a byte array
* @param json the json
* Parse JSON from a byte array
* @param json the JSON
* @param options options for how to parse
* @return the JsonValue
* @throws RuntimeException if there is a problem parsing
Expand All @@ -328,8 +328,8 @@ public static JsonValue parseUnchecked(byte[] json, @Nullable Option... options)
}

/**
* Parse Json from a byte array
* @param json the json
* Parse JSON from a byte array
* @param json the JSON
* @param startIndex the starting index in the array
* @param options options for how to parse
* @return the JsonValue
Expand All @@ -352,15 +352,15 @@ public static JsonValue parseUnchecked(byte[] json, int startIndex, @Nullable Op

/**
* Create a new JsonParse object from a char array
* @param json the json
* @param json the JSON
*/
public JsonParser(char @Nullable [] json) {
this(json, 0);
}

/**
* Create a new JsonParse object from a char array
* @param json the json
* @param json the JSON
* @param options options for how to parse
*/
public JsonParser(char @Nullable [] json, @Nullable Option... options) {
Expand All @@ -369,7 +369,7 @@ public JsonParser(char @Nullable [] json, @Nullable Option... options) {

/**
* Create a new JsonParse object from a char array
* @param json the json
* @param json the JSON
* @param startIndex the starting index in the array
* @param options options for how to parse
*/
Expand All @@ -390,7 +390,7 @@ public JsonParser(char @Nullable [] json, int startIndex, @Nullable Option... op
}

/**
* Parse the json
* Parse the JSON
* @return a JsonValue
* @throws JsonParseException if there is a problem parsing
*/
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/synadia/json/JsonValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -409,18 +409,18 @@ else if (type == JsonValueType.ARRAY) {
}

/**
* Create a json string using the class simple name as the key for the entire object
* Create a JSON string using the class simple name as the key for the entire object
* @param c the class
* @return the json string
* @return the JSON string
*/
public String toString(Class<?> c) {
return JsonWriteUtils.toKey(c) + toJson();
}

/**
* Create a json string using the class simple name as the key for the entire object
* Create a JSON string using the class simple name as the key for the entire object
* @param key the field name
* @return the json string
* @return the JSON string
*/
public String toString(String key) {
return JsonWriteUtils.toKey(key) + toJson();
Expand Down
Loading