Package org.apache.juneau.json
Class Json5Serializer
- All Implemented Interfaces:
- AnnotationProvider,- JsonMetaProvider
- Direct Known Subclasses:
- Json5Serializer.Readable
Serializes POJO models to Simplified JSON.
 Accept  types:  application/json, text/json 
 
Media types
Handles
 Produces 
Description
This is a JSON serializer that uses simplified notation:
- Lax quoting of JSON attribute names.
- Single quotes.
Notes:
- This class is thread safe and reusable.
See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classDefault serializer, single quotes, simple mode, with whitespace.Nested classes/interfaces inherited from class org.apache.juneau.json.JsonSerializerJsonSerializer.Builder, JsonSerializer.ReadableSafeNested classes/interfaces inherited from class org.apache.juneau.serializer.SerializerSerializer.Null
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Json5SerializerDefault serializer, single quotes,simple mode.static final Json5SerializerDefault serializer, single quotes, simple mode, with whitespace.static final Json5SerializerDefault serializer, single quotes,simple mode, sorted bean properties.Fields inherited from class org.apache.juneau.ContextCONTEXT_APPLY_FILTERFields inherited from interface org.apache.juneau.AnnotationProviderDISABLE_ANNOTATION_CACHING
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncopy()Creates a builder from this context object.static JsonSerializer.Buildercreate()Creates a new builder for this object.Methods inherited from class org.apache.juneau.json.JsonSerializercreateSession, getJsonBeanPropertyMeta, getJsonClassMeta, getSchemaSerializer, getSession, isAddBeanTypes, isEscapeSolidus, isSimpleAttrs, propertiesMethods inherited from class org.apache.juneau.serializer.WriterSerializergetFileCharset, getMaxIndent, getQuoteChar, getStreamCharset, isUseWhitespace, isWriterSerializer, println, quoteChar, serialize, toStringMethods inherited from class org.apache.juneau.serializer.SerializercreateSerializerBuilder, doSerialize, forEachAcceptMediaType, getListener, getMediaTypeRanges, getPrimaryMediaType, getResponseContentType, getResponseHeaders, getUriContext, getUriRelativity, getUriResolution, isAddRootType, isKeepNullProperties, isSortCollections, isSortMaps, isTrimEmptyCollections, isTrimEmptyMaps, isTrimStrings, serialize, serializeToStringMethods inherited from class org.apache.juneau.BeanTraverseContextgetInitialDepth, getMaxDepth, isDetectRecursions, isIgnoreRecursionsMethods inherited from class org.apache.juneau.BeanContextablegetBeanContextMethods inherited from class org.apache.juneau.ContextcreateBuilder, firstAnnotation, firstAnnotation, firstAnnotation, firstAnnotation, firstDeclaredAnnotation, forEachAnnotation, forEachAnnotation, forEachAnnotation, forEachAnnotation, forEachDeclaredAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, init, isDebug, lastAnnotation, lastAnnotation, lastAnnotation, lastAnnotation, lastDeclaredAnnotation, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.juneau.AnnotationProviderfirstAnnotation, firstAnnotation, firstAnnotation, firstAnnotation, firstDeclaredAnnotation, forEachAnnotation, forEachAnnotation, forEachAnnotation, forEachAnnotation, forEachDeclaredAnnotation, lastAnnotation, lastAnnotation, lastAnnotation, lastAnnotation, lastDeclaredAnnotation
- 
Field Details- 
DEFAULTDefault serializer, single quotes,simple mode.
- 
DEFAULT_SORTEDDefault serializer, single quotes,simple mode, sorted bean properties.
- 
DEFAULT_READABLEDefault serializer, single quotes, simple mode, with whitespace.
 
- 
- 
Constructor Details- 
Json5SerializerConstructor.- Parameters:
- builder- The builder for this object.
 
 
- 
- 
Method Details- 
createCreates a new builder for this object.- Returns:
- A new builder.
 
- 
copyDescription copied from class:ContextCreates a builder from this context object.Builders are used to define new contexts (e.g. serializers, parsers) based on existing configurations. - Overrides:
- copyin class- JsonSerializer
- Returns:
- A new Builder object.
 
 
-