Code example for JsonWriter

Methods: beginObject

0
     
     
    //TODO replace all this scary json stuff with a generic reflection-based serializer 
    public void toJson(JsonWriter writer) throws IOException
    { 
        writer.beginObject()
            .name("name").value(name) //$NON-NLS-1$
            .name("roundedCorners").value(roundedCorners) //$NON-NLS-1$
            .name("backgroundColor").value(backgroundColor) //$NON-NLS-1$
            .name("backgroundOpacity").value(backgroundOpacity) //$NON-NLS-1$
            .name("storyTitleColor").value(storyTitleColor) //$NON-NLS-1$
            .name("storyTitleFontSize").value(storyTitleFontSize) //$NON-NLS-1$
            .name("storyTitleUppercase").value(storyTitleUppercase) //$NON-NLS-1$
            .name("storyTitleMaxLines").value(storyTitleMaxLines) //$NON-NLS-1$
            .name("storyTitleHide").value(storyTitleHide) //$NON-NLS-1$
            .name("storyDescriptionColor").value(storyDescriptionColor) //$NON-NLS-1$
            .name("storyDescriptionFontSize").value(storyDescriptionFontSize) //$NON-NLS-1$
            .name("storyDescriptionMaxWordCount").value(storyDescriptionMaxWordCount) //$NON-NLS-1$
            .name("showFooter").value(showFooter) //$NON-NLS-1$
            .name("footerUppercase").value(footerUppercase) //$NON-NLS-1$
            .name("footerFontSize").value(footerFontSize) //$NON-NLS-1$