public class JsonMappers extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CUSTOM_REGISTRATION_PROPERTY
This system property is provided as an alternative to
registerLegacyCustomClassesForJSON(Class[])
Classes can be specified in comma-separated format |
Constructor and Description |
---|
JsonMappers() |
Modifier and Type | Method and Description |
---|---|
static org.nd4j.shade.jackson.databind.ObjectMapper |
getLegacyMapperFor(Class<?> clazz)
Get the legacy JSON mapper for the specified class.
NOTE: This is intended for internal backward-compatibility use. |
static org.nd4j.shade.jackson.databind.ObjectMapper |
getMapper() |
static org.nd4j.shade.jackson.databind.ObjectMapper |
getMapperYaml() |
static void |
registerLegacyCustomClassesForJSON(Class<?>... classes)
Register a set of classes (Transform, Filter, etc) for JSON deserialization.
This is required ONLY when BOTH of the following conditions are met: 1. |
static void |
registerLegacyCustomClassesForJSON(List<org.nd4j.linalg.primitives.Pair<String,Class>> classes)
Register a set of classes (Layer, GraphVertex, InputPreProcessor, IActivation, ILossFunction, ReconstructionDistribution
ONLY) for JSON deserialization, with custom names.
Using this method directly should never be required (instead: use registerLegacyCustomClassesForJSON(Class[])
but is added in case it is required in non-standard circumstances. |
static void |
registerLegacyCustomClassesForJSONList(List<Class<?>> classes) |
public static String CUSTOM_REGISTRATION_PROPERTY
registerLegacyCustomClassesForJSON(Class[])
Classes can be specified in comma-separated formatpublic static void registerLegacyCustomClassesForJSON(Class<?>... classes)
classes
- Classes to registerpublic static void registerLegacyCustomClassesForJSONList(List<Class<?>> classes)
public static void registerLegacyCustomClassesForJSON(List<org.nd4j.linalg.primitives.Pair<String,Class>> classes)
registerLegacyCustomClassesForJSON(Class[])
but is added in case it is required in non-standard circumstances.public static org.nd4j.shade.jackson.databind.ObjectMapper getLegacyMapperFor(@NonNull Class<?> clazz)
public static org.nd4j.shade.jackson.databind.ObjectMapper getMapper()
public static org.nd4j.shade.jackson.databind.ObjectMapper getMapperYaml()
Copyright © 2018. All rights reserved.