Class JsonParser

java.lang.Object
com.mysql.cj.xdevapi.JsonParser

public class JsonParser
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    JsonParser()  
  • Method Summary

    Modifier and Type Method Description
    static JsonArray parseArray​(java.io.StringReader reader)
    Create JsonArray object from JSON string provided by reader.
    static DbDoc parseDoc​(java.io.StringReader reader)
    Create DbDoc object from JSON string provided by reader.
    static DbDoc parseDoc​(java.lang.String jsonString)
    Create DbDoc object from JSON string.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • parseDoc

      public static DbDoc parseDoc​(java.lang.String jsonString)
      Create DbDoc object from JSON string.
      Parameters:
      jsonString - JSON string representing a document
      Returns:
      New DbDoc object initialized by parsed JSON string.
    • parseDoc

      public static DbDoc parseDoc​(java.io.StringReader reader) throws java.io.IOException
      Create DbDoc object from JSON string provided by reader.
      Parameters:
      reader - JSON string reader.
      Returns:
      New DbDoc object initialized by parsed JSON string.
      Throws:
      java.io.IOException - if can't read
    • parseArray

      public static JsonArray parseArray​(java.io.StringReader reader) throws java.io.IOException
      Create JsonArray object from JSON string provided by reader.
      Parameters:
      reader - JSON string reader.
      Returns:
      New JsonArray object initialized by parsed JSON string.
      Throws:
      java.io.IOException - if can't read