2 * Copyright (c) 2017 Pantheon Technologies, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.data.codec.gson;
10 import org.slf4j.Logger;
11 import org.slf4j.LoggerFactory;
13 @Deprecated(since = "13.0.3", forRemoval = true)
14 final class NullJSONCodec implements JSONCodec<Object> {
15 static final NullJSONCodec INSTANCE = new NullJSONCodec();
16 private static final Logger LOG = LoggerFactory.getLogger(NullJSONCodec.class);
18 private NullJSONCodec() {
23 public Class<Object> getDataType() {
28 public Object parseValue(final String str) {
29 LOG.warn("Call of the deserializeString method on null codec. No operation performed.");
34 public void writeValue(final JSONValueWriter ctx, final Object value) {
35 // NOOP since codec is unknown.
36 LOG.warn("Call of the serializeToWriter method on null codec. No operation performed.");
40 public JSONValue unparseValue(final Object value) {
41 throw new UnsupportedOperationException();