use of org.onosproject.mapping.addresses.MappingAddress in project onos by opennetworkinglab.
the class MappingKeyCodec method decode.
@Override
public MappingKey decode(ObjectNode json, CodecContext context) {
if (json == null || !json.isObject()) {
return null;
}
MappingKey.Builder builder = DefaultMappingKey.builder();
ObjectNode addressJson = get(json, ADDRESS);
if (addressJson != null) {
final JsonCodec<MappingAddress> addressCodec = context.codec(MappingAddress.class);
builder.withAddress(addressCodec.decode(addressJson, context));
}
return builder.build();
}
Aggregations