src/main/java/de/blau/android/presets/Preset.java
/**
     * Generate a JSON representation of all PresetItems in this Preset
     * 
     * @return JSON format string
     */
Generate a JSON representation of all PresetItems in this Preset

@return JSON format string
Generate a JSON representation of all PresetItems in this Preset @return JSON format string
@NonNull
    private String toJSON() {
        final StringBuilder result = new StringBuilder();
        processElements(rootGroup, (PresetElement element) -> {
            if (element instanceof PresetItem && !((PresetItem) element).isChunk()) {
                if (result.length() != 0) {
                    result.append(",\n");
                }
                result.append(((PresetItem) element).toJSON());
            }
        });
        return result.toString();
    }
@ NonNull private String toJSON ( ) { final StringBuilder result = new StringBuilder ( ) ; processElements ( rootGroup , ( PresetElement element ) -> { if ( element instanceof PresetItem && ! ( ( PresetItem ) element ) . isChunk ( ) ) { if ( result . length ( ) != 0 ) { result . append ( ",\n" ) ; } result . append ( ( ( PresetItem ) element ) . toJSON ( ) ) ; } } ) ; return result . toString ( ) ; }
Generate a JSON representation of all PresetItems in this Preset
Generate a JSON representation of all PresetItems in this Preset