protected TXTRecord createRecord(final Name name, final int dclass,
final long ttl, final ObjectNode recordNode) {
try {
String strings = getNodeStringValue(recordNode, STRINGS_FIELD_NAME);
if (!CharMatcher.ASCII.matchesAllOf(strings)) {
throw new JsonDeserializationException(
JsonDeserializationExceptionCode.invalidFieldValue,
"strings", getTextualBeanType(), "Non-ASCII character found");
}
return (TXTRecord) TXTRecord.fromString(name, Type.TXT, dclass,
ttl, strings, Name.root);
} catch (final IOException e) {
throw new JsonDeserializationException(
JsonDeserializationExceptionCode.unexpectedMappingError,
e, getTextualBeanType(), e.getMessage());
}
}