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 Data Binding Source Code
Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java".
Jackson Databind Source Code files are provided in the source packge (jackson-databind-2.14.0-sources.jar). You can download it at Jackson Maven Website.
You can also browse Jackson Databind Source Code below:
✍: FYIcenter.com
⏎ com/fasterxml/jackson/databind/util/RawValue.java
package com.fasterxml.jackson.databind.util; import java.io.IOException; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.SerializableString; import com.fasterxml.jackson.databind.JsonSerializable; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.jsontype.TypeSerializer; /** * Helper class used to encapsulate "raw values", pre-encoded textual content * that can be output as opaque value with no quoting/escaping, using * {@link com.fasterxml.jackson.core.JsonGenerator#writeRawValue(String)}. * It may be stored in {@link TokenBuffer}, as well as in Tree Model * ({@link com.fasterxml.jackson.databind.JsonNode}) * * @since 2.6 */ public class RawValue implements JsonSerializable { /** * Contents to serialize. Untyped because there are multiple types that are * supported: {@link java.lang.String}, {@link JsonSerializable}, {@link SerializableString}. */ protected Object _value; public RawValue(String v) { _value = v; } public RawValue(SerializableString v) { _value = v; } public RawValue(JsonSerializable v) { _value = v; } /** * Constructor that may be used by sub-classes, and allows passing value * types other than ones for which explicit constructor exists. Caller has to * take care that values of types not supported by base implementation are * handled properly, usually by overriding some of existing serialization * methods. */ protected RawValue(Object value, boolean bogus) { _value = value; } /** * Accessor for returning enclosed raw value in whatever form it was created in * (usually {@link java.lang.String}, {link SerializableString}, or any {@link JsonSerializable}). */ public Object rawValue() { return _value; } @Override public void serialize(JsonGenerator gen, SerializerProvider serializers) throws IOException { if (_value instanceof JsonSerializable) { ((JsonSerializable) _value).serialize(gen, serializers); } else { _serialize(gen); } } @Override public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException { if (_value instanceof JsonSerializable) { ((JsonSerializable) _value).serializeWithType(gen, serializers, typeSer); } else if (_value instanceof SerializableString) { /* Since these are not really to be deserialized (with or without type info), * just re-route as regular write, which will create one... hopefully it works */ serialize(gen, serializers); } } public void serialize(JsonGenerator gen) throws IOException { if (_value instanceof JsonSerializable) { // No SerializerProvider passed, must go via generator, callback gen.writeObject(_value); } else { _serialize(gen); } } protected void _serialize(JsonGenerator gen) throws IOException { if (_value instanceof SerializableString) { gen.writeRawValue((SerializableString) _value); } else { gen.writeRawValue(String.valueOf(_value)); } } @Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof RawValue)) return false; RawValue other = (RawValue) o; if (_value == other._value) { return true; } return (_value != null) && _value.equals(other._value); } @Override public int hashCode() { return (_value == null) ? 0 : _value.hashCode(); } @Override public String toString() { return String.format("[RawValue of type %s]", ClassUtil.classNameOf(_value)); } }
⏎ com/fasterxml/jackson/databind/util/RawValue.java
Or download all of them as a single archive file:
File name: jackson-databind-2.14.0-sources.jar File size: 1187952 bytes Release date: 2022-11-05 Download
⇒ Jackson Annotations Source Code
⇐ Download and Install Jackson Binary Package
2022-03-29, 80828👍, 0💬
Popular Posts:
What Is ojdbc14.jar for Oracle 10g R2? ojdbc14.jar for Oracle 10g R2 is the JAR files of ojdbc.jar, ...
ASM is an all purpose Java bytecode manipulation and analysis framework. It can be used to modify ex...
JDK 11 jdk.jfr.jmod is the JMOD file for JDK 11 JFR module. JDK 11 JFR module compiled class files a...
Java Servlet 3.0 Specification API. JAR File Size and Download Location: File name: servlet-api.jar,...
JDK 11 java.sql.rowset.jmod is the JMOD file for JDK 11 SQL Rowset module. JDK 11 SQL Rowset module ...