Categories:
Audio (13)
Biotech (29)
Bytecode (35)
Database (77)
Framework (7)
Game (7)
General (512)
Graphics (53)
I/O (32)
IDE (2)
JAR Tools (86)
JavaBeans (16)
JDBC (89)
JDK (337)
JSP (20)
Logging (103)
Mail (54)
Messaging (8)
Network (71)
PDF (94)
Report (7)
Scripting (83)
Security (32)
Server (119)
Servlet (17)
SOAP (24)
Testing (50)
Web (19)
XML (301)
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.12.4-sources.jar). You can download it at Jackson Maven Website.
You can also browse Jackson Annotations Source Code below:
✍: FYIcenter.com
⏎ com/fasterxml/jackson/databind/deser/std/StackTraceElementDeserializer.java
package com.fasterxml.jackson.databind.deser.std; import java.io.IOException; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.DeserializationFeature; public class StackTraceElementDeserializer extends StdScalarDeserializer<StackTraceElement> { private static final long serialVersionUID = 1L; public StackTraceElementDeserializer() { super(StackTraceElement.class); } @Override public StackTraceElement deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { JsonToken t = p.currentToken(); // Must get an Object if (t == JsonToken.START_OBJECT) { String className = "", methodName = "", fileName = ""; // Java 9 adds couple more things String moduleName = null, moduleVersion = null; String classLoaderName = null; int lineNumber = -1; while ((t = p.nextValue()) != JsonToken.END_OBJECT) { String propName = p.currentName(); // TODO: with Java 8, convert to switch if ("className".equals(propName)) { className = p.getText(); } else if ("classLoaderName".equals(propName)) { classLoaderName = p.getText(); } else if ("fileName".equals(propName)) { fileName = p.getText(); } else if ("lineNumber".equals(propName)) { if (t.isNumeric()) { lineNumber = p.getIntValue(); } else { lineNumber = _parseIntPrimitive(p, ctxt); } } else if ("methodName".equals(propName)) { methodName = p.getText(); } else if ("nativeMethod".equals(propName)) { // no setter, not passed via constructor: ignore } else if ("moduleName".equals(propName)) { moduleName = p.getText(); } else if ("moduleVersion".equals(propName)) { moduleVersion = p.getText(); } else if ("declaringClass".equals(propName) || "format".equals(propName)) { // 01-Nov-2017: [databind#1794] Not sure if we should but... let's prune it for now ; } else { handleUnknownProperty(p, ctxt, _valueClass, propName); } p.skipChildren(); // just in case we might get structured values } return constructValue(ctxt, className, methodName, fileName, lineNumber, moduleName, moduleVersion, classLoaderName); } else if (t == JsonToken.START_ARRAY && ctxt.isEnabled(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS)) { p.nextToken(); final StackTraceElement value = deserialize(p, ctxt); if (p.nextToken() != JsonToken.END_ARRAY) { handleMissingEndArrayForSingle(p, ctxt); } return value; } return (StackTraceElement) ctxt.handleUnexpectedToken(_valueClass, p); } @Deprecated // since 2.9 protected StackTraceElement constructValue(DeserializationContext ctxt, String className, String methodName, String fileName, int lineNumber, String moduleName, String moduleVersion) { return constructValue(ctxt, className, methodName, fileName, lineNumber, moduleName, moduleVersion, null); } /** * Overridable factory method used for constructing {@link StackTraceElement}s. * * @since 2.8 */ protected StackTraceElement constructValue(DeserializationContext ctxt, String className, String methodName, String fileName, int lineNumber, String moduleName, String moduleVersion, String classLoaderName) { // 21-May-2016, tatu: With Java 9, need to use different constructor, probably // via different module, and throw exception here if extra args passed return new StackTraceElement(className, methodName, fileName, lineNumber); } }
⏎ com/fasterxml/jackson/databind/deser/std/StackTraceElementDeserializer.java
Â
⇒ Jackson Dataformat Extensions
⇠Jackson Data Binding Source Code
⇑ Downloading and Reviewing jackson-*.jar
⇑⇑ Jackson - Java JSON library
2022-02-19, 36185👍, 0💬
Popular Posts:
The Web Services Description Language for Java Toolkit (WSDL4J), Release 1.6.2, allows the creation,...
JasperReports, the world's most popular open source business intelligence and reporting engine and J...
JDK 11 jdk.internal.vm.ci.jmod is the JMOD file for JDK 11 Internal VM CI module. JDK 11 Internal VM...
JDK 11 java.xml.crypto.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) Crypto modu...
JDK 11 jdk.jlink.jmod is the JMOD file for JDK 11 JLink tool, which can be invoked by the "jlink" co...