## org.mortbay.util.ajax
Class JSONDateConvertor

    java.lang.Object
      org.mortbay.util.ajax.JSONDateConvertor

All Implemented Interfaces:
  JSON.Convertor

    public class JSONDateConvertor

extends Object
implements JSON.Convertor

Convert a `Date` to JSON. If fromJSON is true in the constructor, the JSON generated will be of the form {class="java.util.Date",value="1/1/1970 12:00 GMT"} If fromJSON is false, then only the string value of the date is generated.

Constructor Summary
`JSONDateConvertor()`
`JSONDateConvertor(boolean fromJSON)`
`JSONDateConvertor(String format, TimeZone zone, boolean fromJSON)`

Method Summary
`Object` `fromJSON(Map map)`
`void` `toJSON(Object obj, JSON.Output out)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JSONDateConvertor

    public JSONDateConvertor()

### JSONDateConvertor

    public JSONDateConvertor(boolean fromJSON)

### JSONDateConvertor

    public JSONDateConvertor(String format,
                             TimeZone zone,
                             boolean fromJSON)

Method Detail

### fromJSON

    public Object fromJSON(Map map)

  Specified by:
    `fromJSON` in interface `JSON.Convertor`

### toJSON

    public void toJSON(Object obj,
                       JSON.Output out)

  Specified by:
    `toJSON` in interface `JSON.Convertor`

Copyright © 2008 Mort Bay Consulting. All Rights Reserved.