public class JacksonJsonSerialization extends Object implements GedcomxEntrySerializer, GedcomxEntryDeserializer
JAXBContext appropriate for reading and writing GEDCOM X files.| Constructor and Description |
|---|
JacksonJsonSerialization(boolean pretty,
Class<?>... classes) |
JacksonJsonSerialization(Class<?>... classes) |
JacksonJsonSerialization(com.fasterxml.jackson.databind.ObjectMapper mapper) |
| Modifier and Type | Method and Description |
|---|---|
static com.fasterxml.jackson.databind.ObjectMapper |
createObjectMapper(boolean pretty,
Class<?>... classes) |
Object |
deserialize(InputStream in,
String mediaType)
Deserialize the resource from the specified input stream.
|
protected Class<?> |
findClass(String mediaType) |
void |
serialize(Object resource,
OutputStream out)
Serialize the resource to the specified output stream.
|
String |
suggestFilenameExtension()
Suggest a filename extension for the entries of this serializer.
|
public JacksonJsonSerialization(Class<?>... classes)
public JacksonJsonSerialization(boolean pretty,
Class<?>... classes)
public JacksonJsonSerialization(com.fasterxml.jackson.databind.ObjectMapper mapper)
public static com.fasterxml.jackson.databind.ObjectMapper createObjectMapper(boolean pretty,
Class<?>... classes)
public Object deserialize(InputStream in, String mediaType) throws IOException
GedcomxEntryDeserializerdeserialize in interface GedcomxEntryDeserializerin - The input stream.mediaType - The media type of the input stream.IOException - a IOExceptionpublic void serialize(Object resource, OutputStream out) throws IOException
GedcomxEntrySerializerserialize in interface GedcomxEntrySerializerresource - the resource.out - the output stream.IOException - a IOExceptionpublic String suggestFilenameExtension()
GedcomxEntrySerializersuggestFilenameExtension in interface GedcomxEntrySerializerCopyright © 2024. All rights reserved.