geojson module creates invalid json for date attribute ------------------------------------------------------
Key: GEOT-3266 URL: http://jira.codehaus.org/browse/GEOT-3266 Project: GeoTools Issue Type: Bug Affects Versions: 2.7-M3 Reporter: Jan De Moerloose The following code in GeoJSONUtil will apply a toString() to the date value, resulting in an unquoted string in the JSON result: public static StringBuilder entry(String key, Object value, StringBuilder sb) { string(key, sb).append(":"); if (value instanceof String) { string((String)value, sb); } else { sb.append(value); } return sb; } JSON result: {"type":"Feature","geometry":{"type":"Point","coordinates":[1.1,1.1]},"properties":{"int":1,"double":1.1,"string":"one","date":Mon Feb 01 15:36:06 CET 2010},"id":"feature.1"} As JSON does not know of any date type, it should produce either a standard string notation (ISO 8601) or a number as in java getTime(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel