Class CrumParser

java.lang.Object
io.crums.model.json.CrumParser

public class CrumParser
extends java.lang.Object
JSON crum parser.
  • Field Summary

    Fields
    Modifier and Type Field Description
    static java.lang.String HASH  
    static CrumParser INSTANCE
    Instances of this class are immutable and stateless.
    static java.lang.String UTC  
  • Constructor Summary

    Constructors
    Constructor Description
    CrumParser()  
  • Method Summary

    Modifier and Type Method Description
    Crum toCrum​(java.lang.String json)  
    Crum toCrum​(org.json.simple.JSONObject jsonObj)  
    org.json.simple.JSONObject toJsonObject​(Crum crum)  

    Methods inherited from class java.lang.Object

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

    • INSTANCE

      public static final CrumParser INSTANCE
      Instances of this class are immutable and stateless.
    • UTC

      public static final java.lang.String UTC
      See Also:
      Constant Field Values
    • HASH

      public static final java.lang.String HASH
      See Also:
      Constant Field Values
  • Constructor Details

    • CrumParser

      public CrumParser()
  • Method Details

    • toJsonObject

      public org.json.simple.JSONObject toJsonObject​(Crum crum)
    • toCrum

      public Crum toCrum​(java.lang.String json)
    • toCrum

      public Crum toCrum​(org.json.simple.JSONObject jsonObj) throws java.lang.IllegalArgumentException
      Throws:
      java.lang.IllegalArgumentException