Class JsonUnflattener

java.lang.Object
org.restheart.utils.JsonUnflattener

public final class JsonUnflattener extends Object
JsonUnflattener provides a static unflatten(String) method to unflatten any flattened JSON string back to nested one.
Author:
Wei-Ming Wu
  • Constructor Summary

    Constructors
    Constructor
    Description
    JsonUnflattener(org.bson.BsonValue json)
    Creates a JSON unflattener.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
     
    org.bson.BsonValue
    Returns a JSON string of nested objects by the given flattened JSON string.
    static org.bson.BsonValue
    unflatten(org.bson.BsonValue json)
    Returns a JSON string of nested objects by the given flattened JSON string.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • JsonUnflattener

      public JsonUnflattener(org.bson.BsonValue json)
      Creates a JSON unflattener.
      Parameters:
      json -
  • Method Details

    • unflatten

      public static org.bson.BsonValue unflatten(org.bson.BsonValue json)
      Returns a JSON string of nested objects by the given flattened JSON string.
      Parameters:
      json - a flattened JSON string
      Returns:
      a JSON string of nested objects
    • unflatten

      public org.bson.BsonValue unflatten()
      Returns a JSON string of nested objects by the given flattened JSON string.
      Returns:
      a JSON string of nested objects
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object