Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
Jackson Annotations Source Code
Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java".
Jackson Annotations Source Code files are provided in the source packge (jackson-annotations-2.14.0-sources.jar). You can download it at Jackson Maven Website.
You can also browse Jackson Annotations Source Code below:
✍: FYIcenter.com
⏎ com/fasterxml/jackson/annotation/JsonUnwrapped.java
package com.fasterxml.jackson.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Annotation used to indicate that a <b>POJO-valued</b> property should be * serialized "unwrapped" -- that is, if it would be serialized as Object value, * its properties are instead included as properties of its containing * Object -- and deserialized reproducing "missing" structure. * For example, consider case of POJO like: *<pre> * public class Parent { * public int age; * public Name name; * } * public class Name { * public String first, last; * } *</pre> * which would normally be serialized as follows (assuming {@code @JsonUnwrapped} * had no effect): *<pre> * { * "age" : 18, * "name" : { * "first" : "Joey", * "last" : "Sixpack" * } * } *</pre> * can be changed to this: *<pre> * { * "age" : 18, * "first" : "Joey", * "last" : "Sixpack" * } *</pre> * by changing Parent class to: *<pre> * public class Parent { * public int age; * @JsonUnwrapped * public Name name; * } *</pre> * Annotation can only be added to properties, and not classes, as it is contextual. * When values are deserialized "wrapping" is applied so that serialized output can * be read back in. *<p> * Also note that annotation only applies if: *<ul> * <li>Value is serialized as an Object value (can not unwrap Array values using this * mechanism) * </li> * <li>Reading/writing is done using Jackson standard {@code BeanDeserializer} / * {@code BeanSerializer}; or custom deserializer/serializer MUST explicitly * support similar operation. * </li> * <li>Will not work with polymorphic type handling ("polymorphic deserialization") * </li> * </ul> * Specifically note that this annotation WILL NOT WORK for structured types like * {@link java.util.Map}s or {@code JsonNode}s: for these types you will * instead need to use {@link JsonAnyGetter} and {@link JsonAnySetter} to achieve * similar operation. */ @Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) @JacksonAnnotation public @interface JsonUnwrapped { /** * Property that is usually only used when overriding (masking) annotations, * using mix-in annotations. Otherwise default value of 'true' is fine, and * value need not be explicitly included. */ boolean enabled() default true; /** * Optional property that can be used to add prefix String to use in front * of names of properties that are unwrapped: this can be done for example to prevent * name collisions. */ String prefix() default ""; /** * Optional property that can be used to add suffix String to append at the end * of names of properties that are unwrapped: this can be done for example to prevent * name collisions. */ String suffix() default ""; }
⏎ com/fasterxml/jackson/annotation/JsonUnwrapped.java
Or download all of them as a single archive file:
File name: jackson-annotations-2.14.0-sources.jar File size: 80402 bytes Release date: 2022-11-05 Download
⇒ Jackson Dataformat Extensions
⇐ Jackson Data Binding Source Code
2022-02-19, 57003👍, 0💬
Popular Posts:
ZooKeeper is a centralized service for maintaining configuration information, naming, providing dist...
Where Can I see Java Source Code files for Xerces Java 2.11.2? Here are Java Source Code files for X...
JDK 11 jdk.compiler.jmod is the JMOD file for JDK 11 Compiler tool, which can be invoked by the "jav...
Java Architecture for XML Binding (JAXB) is a Java API that allows Java developers to map Java class...
GJT (Giant Java Tree) implementation of XML Pull Parser. JAR File Size and Download Location: File n...