Class JsonValue

java.lang.Object
com.cedarsoftware.util.io.JsonValue
Direct Known Subclasses:
JsonObject

public abstract class JsonValue extends Object
This class is the parent class for all parsed JSON objects, arrays, or primitive values.
Author:
John DeRegnaucourt ([email protected])
Copyright (c) Cedar Software LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

License

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.*
  • Field Details

  • Constructor Details

    • JsonValue

      public JsonValue()
  • Method Details

    • isReference

      public boolean isReference()
    • getReferenceId

      public Long getReferenceId()
    • setReferenceId

      public void setReferenceId(Long id)
    • isFinished

      public boolean isFinished()
    • setFinished

      public void setFinished()
    • setTarget

      public void setTarget(Object target)
    • setFinishedTarget

      public Object setFinishedTarget(Object o, boolean isFinished)
    • getTarget

      public Object getTarget()
    • isArray

      public abstract boolean isArray()
    • getJavaType

      public Class<?> getJavaType()
    • setJavaType

      public void setJavaType(Class<?> type)
    • setHintType

      public void setHintType(Class<?> type)
    • getJavaTypeName

      public String getJavaTypeName()
    • getId

      public long getId()
    • setId

      public void setId(long id)
    • hasId

      public boolean hasId()
      A JsonObject starts off with an id of -1. Also, an id of 0 is not considered a valid id. It must be 1 or greater. JsonWriter utilizes this fact.