public void write(Object obj)
    {
        traceReferences(obj);
        objVisited.clear();
        try
        {
            writeImpl(obj, true);
        }
        catch (Exception e)
        {
            throw new JsonIoException("Error writing object to JSON:", e);
        }
        flush();
        objVisited.clear();
        objsReferenced.clear();
    }
public void write(Object obj)
    {
        traceReferences(obj);
        objVisited.clear();
        try
        {
            writeImpl(obj, true);
        }
        catch (Exception e)
        {
            throw new JsonIoException("Error writing object to JSON:", e);
        }
        flush();
        objVisited.clear();
        objsReferenced.clear();
    }
public void write ( Object obj ) { traceReferences ( obj ) ; objVisited . clear ( ) ; try { writeImpl ( obj , true ) ; } catch ( Exception e ) { throw new JsonIoException ( "Error writing object to JSON:" , e ) ; } flush ( ) ; objVisited . clear ( ) ; objsReferenced . clear ( ) ; }
Write the passed in Java object in JSON format.
@param obj Object any Java Object or JsonObject.
Write the passed in Java object in JSON format .