Package jodd.json.impl

Source Code of jodd.json.impl.ObjectJsonSerializer

// Copyright (c) 2003-2014, Jodd Team (jodd.org). All Rights Reserved.

package jodd.json.impl;

import jodd.json.BeanSerializer;
import jodd.json.JsonContext;

/**
* Main serializer for objects. It is also the last serializer, used when
* no other serializer is found.
*/
public class ObjectJsonSerializer extends ValueJsonSerializer<Object> {

  public void serializeValue(final JsonContext jsonContext, Object value) {
    jsonContext.writeOpenObject();

    BeanSerializer beanVisitor = new BeanSerializer(jsonContext, value);
    beanVisitor.serialize();

    jsonContext.writeCloseObject();
  }

}
TOP

Related Classes of jodd.json.impl.ObjectJsonSerializer

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.