Skip to content

Commit

Permalink
Add javadoc warning about potential StackOverflowError in JSON parser,
Browse files Browse the repository at this point in the history
…fix #1017
  • Loading branch information
julgus committed Jun 27, 2023
1 parent b233e64 commit 014bc0d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ public static void toJson(Object object, OutputStream out, boolean pretty) throw
* <li>{@code null}
* </ul>
*
* Use caution when parsing nested JSON strings. Deeply nested JSON
* expressions can result in deep call chains, or even StackOverflowError.
*
* @param json the json to parse
* @return the created object
* @throws JsonSyntaxException if there is a syntax error
Expand All @@ -194,6 +197,9 @@ public static Object fromJson(String json) {
* <li>{@code null}
* </ul>
*
* Use caution when parsing nested JSON strings. Deeply nested JSON
* expressions can result in deep call chains, or even StackOverflowError.
*
* @param in the json to parse
* @return the created object
*
Expand Down

0 comments on commit 014bc0d

Please sign in to comment.