public class KsonSerializer extends Object
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Date: 20.12.13 Time: 12:03
Created by ruedi on 07.08.2014.
| Modifier and Type | Field and Description |
|---|---|
protected FSTConfiguration |
conf |
protected KsonTypeMapper |
mapper |
protected KsonCharOutput |
out |
protected boolean |
pretty |
protected boolean |
writeNull |
| Constructor and Description |
|---|
KsonSerializer(KsonCharOutput out,
KsonTypeMapper mapper,
FSTConfiguration conf) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isWriteNull() |
protected void |
removeLastListSep() |
void |
setWriteNull(boolean writeNull) |
protected boolean |
shouldQuote(String string) |
protected void |
writeClazzTag(Class expectedClass,
Object o)
determines classname tagging.
|
protected void |
writeIndent(int indent) |
protected void |
writeKey(String name)
called when writing a key of an key:value inside an object or map
|
protected void |
writeListEnd() |
protected void |
writeListSep() |
protected void |
writeListStart() |
protected void |
writeln() |
void |
writeObject(Object o) |
void |
writeObject(Object o,
Class aClass) |
protected void |
writeObjectInternal(Class expectedClass,
Class expectedValueClass,
Object o,
int indent) |
void |
writeString(String string) |
protected KsonCharOutput out
protected KsonTypeMapper mapper
protected boolean pretty
protected boolean writeNull
protected FSTConfiguration conf
public KsonSerializer(KsonCharOutput out, KsonTypeMapper mapper, FSTConfiguration conf)
protected void writeObjectInternal(Class expectedClass, Class expectedValueClass, Object o, int indent) throws Exception
Exceptionprotected void writeKey(String name)
name - protected void writeClazzTag(Class expectedClass, Object o)
expectedClass - o - protected void writeListEnd()
protected void writeListStart()
protected void removeLastListSep()
protected void writeListSep()
protected void writeln()
public void writeString(String string)
protected boolean shouldQuote(String string)
protected void writeIndent(int indent)
public boolean isWriteNull()
public void setWriteNull(boolean writeNull)
Copyright © 2014. All rights reserved.