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;
14 final class EmptyJSONCodec implements JSONCodec<Void> {
16 static final EmptyJSONCodec INSTANCE = new EmptyJSONCodec();
18 private EmptyJSONCodec() {
23 public Class<Void> getDataType() {
28 public Void parseValue(final Object ctx, final String input) {
33 public void writeValue(final JsonWriter ctx, final Void value) throws IOException {
35 ctx.value((String) null);