2 * Copyright (c) 2015 Cisco Systems, Inc. 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
9 package org.opendaylight.yangtools.yang.data.codec.gson;
11 import com.google.gson.stream.JsonWriter;
12 import java.io.IOException;
13 import org.opendaylight.yangtools.yang.common.Empty;
15 final class EmptyJSONCodec implements JSONCodec<Empty> {
17 static final EmptyJSONCodec INSTANCE = new EmptyJSONCodec();
19 private EmptyJSONCodec() {
24 public Class<Empty> getDataType() {
29 public Empty parseValue(final Object ctx, final String input) {
30 return Empty.getInstance();
34 public void writeValue(final JsonWriter ctx, final Empty value) throws IOException {
36 ctx.value((String) null);