blob: 493d0b4455c5a7c3541b7fb5835d2a24b4e134a0 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
* which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Roman Grigoriadi
******************************************************************************/
package org.eclipse.persistence.json.bind.internal.serializer;
import org.eclipse.persistence.json.bind.model.SerializerBindingModel;
import javax.json.stream.JsonGenerator;
/**
* @author David Král
*/
public class ShortTypeSerializer extends AbstractNumberSerializer<Short> {
public ShortTypeSerializer(SerializerBindingModel model) {
super(Short.class, model);
}
@Override
protected void serializeNonFormatted(Short obj, JsonGenerator generator, String key) {
generator.write(key, obj);
}
@Override
protected void serializeNonFormatted(Short obj, JsonGenerator generator) {
generator.write(obj);
}
}