Package com.cedarsoftware.io
Class JsonValue
java.lang.Object
com.cedarsoftware.io.JsonValue
- Direct Known Subclasses:
JsonObject
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 Summary
Modifier and TypeFieldDescriptionprotected int
protected Class<?>
protected long
static final String
protected boolean
static final String
protected Class<?>
static final String
protected int
static final String
protected Long
static final String
static final String
static final String
static final String
static final String
protected Object
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getCol()
long
getId()
Class<?>
int
getLine()
boolean
hasId()
A JsonObject starts off with an id of -1.abstract boolean
isArray()
boolean
boolean
void
setFinishedTarget
(Object o, boolean isFinished) void
setHintType
(Class<?> type) void
setId
(long id) void
setJavaType
(Class<?> type) void
setReferenceId
(Long id) void
-
Field Details
-
KEYS
- See Also:
-
ITEMS
- See Also:
-
ID
- See Also:
-
REF
- See Also:
-
TYPE
- See Also:
-
SHORT_TYPE
- See Also:
-
SHORT_ITEMS
- See Also:
-
SHORT_KEYS
- See Also:
-
SHORT_ID
- See Also:
-
SHORT_REF
- See Also:
-
VALUE
- See Also:
-
javaType
-
hintType
-
target
-
isFinished
protected boolean isFinished -
id
protected long id -
refId
-
line
protected int line -
col
protected int col
-
-
Constructor Details
-
JsonValue
public JsonValue()
-
-
Method Details
-
getLine
public int getLine() -
getCol
public int getCol() -
isReference
public boolean isReference() -
getReferenceId
-
setReferenceId
-
isFinished
public boolean isFinished() -
setFinished
public void setFinished() -
setTarget
-
setFinishedTarget
-
getTarget
-
isArray
public abstract boolean isArray() -
getJavaType
-
setJavaType
-
setHintType
-
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.
-