net.sf.json.processors
Interface JsonValueProcessor

All Known Implementing Classes:
JsDateJsonValueProcessor

public interface JsonValueProcessor

Base interface for custom serialization per property.

Author:
Andres Almiray

Method Summary
 java.lang.Object processArrayValue(java.lang.Object value, JsonConfig jsonConfig)
          Processes the value an returns a suitable JSON value.
 java.lang.Object processObjectValue(java.lang.String key, java.lang.Object value, JsonConfig jsonConfig)
          Processes the value an returns a suitable JSON value.
 

Method Detail

processArrayValue

java.lang.Object processArrayValue(java.lang.Object value,
                                   JsonConfig jsonConfig)
Processes the value an returns a suitable JSON value.

Parameters:
value - the input value
Returns:
a valid JSON value that represents the input value
Throws:
JSONException - if an error occurs during transformation

processObjectValue

java.lang.Object processObjectValue(java.lang.String key,
                                    java.lang.Object value,
                                    JsonConfig jsonConfig)
Processes the value an returns a suitable JSON value.

Parameters:
key - the name of the property
value - the value of the property
Returns:
a valid JSON value that represents the input property
Throws:
JSONException - if an error occurs during transformation


Copyright © 2006-2010 Json-lib. All Rights Reserved.