Package org.apache.ofbiz.base.lang
Class JSON
java.lang.Object
org.apache.ofbiz.base.lang.JSON
A JSON object.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static JSON
from
(InputStream inStream) Creates aJSON
instance from anInputStream
.static JSON
Creates aJSON
instance from aReader
.static JSON
Creates aJSON
instance from an unknown data type.static JSON
Creates aJSON
instance from aString
.int
hashCode()
<T> T
Converts thisJSON
object to the specified type.toString()
-
Method Details
-
from
Creates aJSON
instance from anInputStream
. The method assumes the character set is UTF-8.- Parameters:
inStream
-- Returns:
- a
JSON
instance - Throws:
IOException
-
from
Creates aJSON
instance from an unknown data type.- Parameters:
object
-- Returns:
- a
JSON
instance - Throws:
IOException
-
from
Creates aJSON
instance from aReader
.- Parameters:
reader
-- Returns:
- a
JSON
instance - Throws:
IOException
-
from
Creates aJSON
instance from aString
.- Parameters:
jsonString
-- Returns:
- a
JSON
instance
-
equals
-
hashCode
public int hashCode() -
toObject
Converts thisJSON
object to the specified type.- Parameters:
targetClass
-- Returns:
- an object of the specified type
- Throws:
IOException
-
toString
-