ref_send API 2.17
defensive programming in Java

org.waterken.syntax.json
Class JSONDeserializer

java.lang.Object
  extended by org.joe_e.Struct
      extended by org.waterken.syntax.json.JSONDeserializer
All Implemented Interfaces:
java.io.Serializable, Immutable, Powerless, Selfless, Record, Deserializer

public final class JSONDeserializer
extends Struct
implements Deserializer, Record, java.io.Serializable

Deserializes a JSON byte stream.

See Also:
Serialized Form

Constructor Summary
JSONDeserializer()
           
 
Method Summary
 java.lang.Object deserialize(java.io.InputStream content, Importer connect, java.lang.String base, java.lang.ClassLoader code, java.lang.reflect.Type type)
          Deserializes an object.
 ConstArray<?> deserializeTuple(java.io.InputStream content, Importer connect, java.lang.String base, java.lang.ClassLoader code, java.lang.reflect.Type... types)
          Deserializes an argument list.
 
Methods inherited from class org.joe_e.Struct
equals, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.joe_e.Selfless
hashCode
 

Constructor Detail

JSONDeserializer

public JSONDeserializer()
Method Detail

deserialize

public java.lang.Object deserialize(java.io.InputStream content,
                                    Importer connect,
                                    java.lang.String base,
                                    java.lang.ClassLoader code,
                                    java.lang.reflect.Type type)
                             throws java.io.IOException,
                                    BadSyntax
Description copied from interface: Deserializer
Deserializes an object.

Specified by:
deserialize in interface Deserializer
Parameters:
content - serialized content, will be closed
connect - reference importer
base - base URL
code - class loader
type - expected type of the referenced object
Returns:
deserialized object
Throws:
java.io.IOException
BadSyntax

deserializeTuple

public ConstArray<?> deserializeTuple(java.io.InputStream content,
                                      Importer connect,
                                      java.lang.String base,
                                      java.lang.ClassLoader code,
                                      java.lang.reflect.Type... types)
                               throws java.lang.Exception
Description copied from interface: Deserializer
Deserializes an argument list.

Specified by:
deserializeTuple in interface Deserializer
Parameters:
content - serialized content, will be closed
connect - reference importer
base - base URL
code - class loader
types - expected type of each argument
Returns:
deserialized tuple
Throws:
java.lang.Exception - any exception

ref_send API 2.17
defensive programming in Java

Submit a bug or feature, or get help

Copyright 1998-2009 Waterken Inc. under the terms of the MIT X license.