Issue 378 - JSONize NaNs as their string equivalent to keep JSONwriter from throwing an exception
git-svn-id: http://google-refine.googlecode.com/svn/trunk@2391 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
76802d328d
commit
3b4bdbecdf
@ -91,6 +91,10 @@ public class Cell implements HasFields, Jsonizable {
|
|||||||
} else if (value instanceof Date) {
|
} else if (value instanceof Date) {
|
||||||
writer.value(ParsingUtilities.dateToString((Date) value));
|
writer.value(ParsingUtilities.dateToString((Date) value));
|
||||||
writer.key("t"); writer.value("date");
|
writer.key("t"); writer.value("date");
|
||||||
|
} else if (value instanceof Double
|
||||||
|
&& (((Double)value).isNaN() || ((Double)value).isInfinite())) {
|
||||||
|
// TODO: Skip? Write as string?
|
||||||
|
writer.value(((Double)value).toString());
|
||||||
} else {
|
} else {
|
||||||
writer.value(value);
|
writer.value(value);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user