Class JsonSchema.BooleanOrSchemaSwap
java.lang.Object
org.apache.juneau.swap.ObjectSwap<Object,Object>
 
org.apache.juneau.bean.jsonschema.JsonSchema.BooleanOrSchemaSwap
- Enclosing class:
- JsonSchema
Used during parsing to convert the additionalProperties  property to the correct class type.
 
- 
      If parsing a JSON-object, converts to a JsonSchema.
- 
      If parsing a JSON-boolean, converts to a Boolean.
Serialization method is a no-op.
- 
Field SummaryFields inherited from class org.apache.juneau.swap.ObjectSwapNULL
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionswap(BeanSession session, Object o) If this transform is to be used to serialize non-serializable objects, it must implement this method.unswap(BeanSession session, Object o, ClassMeta<?> hint) If this transform is to be used to reconstitute objects that aren't true Java beans, it must implement this method.Methods inherited from class org.apache.juneau.swap.ObjectSwapforMediaTypes, forMediaTypes, getNormalClass, getSwapClass, getSwapClassMeta, isNormalObject, isSwappedObject, match, swap, toString, unswap, withTemplate, withTemplate
- 
Constructor Details- 
BooleanOrSchemaSwappublic BooleanOrSchemaSwap()
 
- 
- 
Method Details- 
swapDescription copied from class:ObjectSwapIf this transform is to be used to serialize non-serializable objects, it must implement this method.The object must be converted into one of the following serializable types: - 
      String
- 
      Number
- 
      Boolean
- 
      Collectioncontaining anything on this list.
- 
      Mapcontaining anything on this list.
- A java bean with properties of anything on this list.
- An array of anything on this list.
 - Overrides:
- swapin class- ObjectSwap<Object,- Object> 
- Parameters:
- session- The bean session to use to get the class meta. This is always going to be the same bean context that created this swap.
- o- The object to be transformed.
- Returns:
- The transformed object.
- Throws:
- SerializeException
 
- 
      
- 
unswapDescription copied from class:ObjectSwapIf this transform is to be used to reconstitute objects that aren't true Java beans, it must implement this method.- Overrides:
- unswapin class- ObjectSwap<Object,- Object> 
- Parameters:
- session- The bean session to use to get the class meta. This is always going to be the same bean context that created this swap.
- o- The transformed object.
- hint- If possible, the parser will try to tell you the object type being created. For example, on a serialized date, this may tell you that the object being created must be of type- GregorianCalendar.
 This may be- null if the parser cannot make this determination.
- Returns:
- The narrowed object.
- Throws:
- ParseException
 
 
-