Code example for JsonWriter

Methods: beginObject

0
        return (o instanceof Behaviour) && ((Behaviour) o).getId() == this.getId();
    } 
     
    public void toJson(JsonWriter writer) throws IOException
    { 
        writer.beginObject()
            .name("name").value(name) //$NON-NLS-1$
            .name("mobilizer").value(mobilizer.getName()) //$NON-NLS-1$
            .name("useBuiltInBrowser").value(useBuiltInBrowser) //$NON-NLS-1$
            .name("maxNumberOfNews").value(maxNumberOfNews) //$NON-NLS-1$
            .name("lookupImageInBody").value(lookupImageInBody) //$NON-NLS-1$
            .name("forceFeedAsAuthor").value(forceFeedAsAuthor) //$NON-NLS-1$
            .name("hideReadStories").value(hideReadStories) //$NON-NLS-1$
            .name("distributeEvenly").value(distributeEvenly) //$NON-NLS-1$
            .name("clearBeforeLoad").value(clearBeforeLoad) //$NON-NLS-1$
        .endObject();    
    } 
     
    public void fromJson(JsonReader reader) throws IOException
    { 
        reader.beginObject();