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 Dataformat XML Source Code
Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java".
Jackson also allows you to parse or generate XML messages with the Jackson Dataformat XML Extension.
Jackson Dataformat XML Source Code files are provided in the source packge (jackson-dataformat-xml-2.14.0-sources.jar). You can download it at Jackson Maven Website.
You can also browse Jackson Dataformat XML Source Code below:
✍: FYIcenter.com
⏎ com/fasterxml/jackson/dataformat/xml/DefaultingXmlTypeResolverBuilder.java
package com.fasterxml.jackson.dataformat.xml; import java.util.Collection; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping; import com.fasterxml.jackson.databind.cfg.MapperConfig; import com.fasterxml.jackson.databind.jsontype.NamedType; import com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator; import com.fasterxml.jackson.databind.jsontype.TypeIdResolver; import com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder; import com.fasterxml.jackson.dataformat.xml.util.StaxUtil; /** * Sub-class of {@code StdTypeResolverBuilder} specifically used with * Default Typing. *<p> * Composition/sub-classing gets quite tricky here: ideally we would just * extend {@link XmlTypeResolverBuilder} but unfortunately inheritance hierarchy * does not allow this. * * @since 2.10 */ public class DefaultingXmlTypeResolverBuilder extends ObjectMapper.DefaultTypeResolverBuilder implements java.io.Serializable { private static final long serialVersionUID = 1L; public DefaultingXmlTypeResolverBuilder(DefaultTyping t, PolymorphicTypeValidator ptv) { super(t, ptv); } /* /********************************************************************** /* Methods copied from `XmlTypeResolverBuilder` /********************************************************************** */ @Override public StdTypeResolverBuilder init(JsonTypeInfo.Id idType, TypeIdResolver idRes) { super.init(idType, idRes); if (_typeProperty != null) { _typeProperty = StaxUtil.sanitizeXmlTypeName(_typeProperty); } return this; } @Override public StdTypeResolverBuilder typeProperty(String typeIdPropName) { // ok to have null/empty; will restore to use defaults if (typeIdPropName == null || typeIdPropName.length() == 0) { typeIdPropName = _idType.getDefaultPropertyName(); } _typeProperty = StaxUtil.sanitizeXmlTypeName(typeIdPropName); return this; } @Override protected TypeIdResolver idResolver(MapperConfig<?> config, JavaType baseType, PolymorphicTypeValidator subtypeValidator, Collection<NamedType> subtypes, boolean forSer, boolean forDeser) { if (_customIdResolver != null) { return _customIdResolver; } // Only override handlers of class, minimal class; name is good as is switch (_idType) { case CLASS: return new XmlTypeResolverBuilder.XmlClassNameIdResolver(baseType, config.getTypeFactory(), subTypeValidator(config)); case MINIMAL_CLASS: return new XmlTypeResolverBuilder.XmlMinimalClassNameIdResolver(baseType, config.getTypeFactory(), subTypeValidator(config)); default: } return super.idResolver(config, baseType, subtypeValidator, subtypes, forSer, forDeser); } }
⏎ com/fasterxml/jackson/dataformat/xml/DefaultingXmlTypeResolverBuilder.java
Or download all of them as a single archive file:
File name: jackson-dataformat-xml-2.14.0-sources.jar File size: 98015 bytes Release date: 2022-11-05 Download
⇒ Download Jackson Dataformat Binary Packages
⇐ Jackson Dataformat Extensions
2021-10-10, 16195👍, 0💬
Popular Posts:
What Is log4j-1.2.15.jar? I got the JAR file from apache-log4j-1.2.15.zip. log4j-1.2.15.jar is the v...
JDK 17 java.base.jmod is the JMOD file for JDK 17 Base module. JDK 17 Base module compiled class fil...
JDOM provides a solution for using XML from Java that is as simple as Java itself. There is no compe...
JDK 11 jdk.crypto.cryptoki.jmod is the JMOD file for JDK 11 Crypto Cryptoki module. JDK 11 Crypto KI...
What Is mail.jar of JavaMail 1.4? I got the JAR file from javamail-1_4.zip. mail.jar in javamail-1_4...