Mercurial > dive4elements > framework
diff artifacts-common/src/main/java/de/intevation/artifacts/common/utils/JSON.java @ 394:c40729bfe06d
Removed trailing whitespace.
artifacts/trunk@4764 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 23 Jun 2012 08:20:02 +0000 |
parents | 823752e3d392 |
children |
line wrap: on
line diff
--- a/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/JSON.java Tue Jun 05 13:32:14 2012 +0000 +++ b/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/JSON.java Sat Jun 23 08:20:02 2012 +0000 @@ -26,7 +26,7 @@ } public static final boolean isWhitespace(int c) { - return c == ' ' || c == '\n' || c == '\r' + return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == '\f'; } @@ -160,8 +160,8 @@ out.print(']'); } - public static Map<String, Object> parse(String in) - throws IOException + public static Map<String, Object> parse(String in) + throws IOException { return parse(asInputStream(in)); } @@ -178,14 +178,14 @@ return new ByteArrayInputStream(bytes); } - public static Map<String, Object> parse(InputStream in) - throws IOException + public static Map<String, Object> parse(InputStream in) + throws IOException { return parseObject(new PushbackInputStream(in, 1)); } - public static Map<String, Object> parse(PushbackInputStream in) - throws IOException + public static Map<String, Object> parse(PushbackInputStream in) + throws IOException { return parseObject(in); } @@ -266,7 +266,7 @@ private static final Boolean parseTrue(InputStream in) throws IOException - { + { match('t', eof(in)); match('r', eof(in)); match('u', eof(in)); @@ -276,7 +276,7 @@ private static final Boolean parseFalse(InputStream in) throws IOException - { + { match('f', eof(in)); match('a', eof(in)); match('l', eof(in)); @@ -287,7 +287,7 @@ private static final Object parseNull(InputStream in) throws IOException - { + { match('n', eof(in)); match('u', eof(in)); match('l', eof(in)); @@ -415,7 +415,7 @@ pairs.put(string, value); } - private static Map<String, Object> parseObject(PushbackInputStream in) + private static Map<String, Object> parseObject(PushbackInputStream in) throws IOException { Map<String, Object> pairs = new LinkedHashMap<String, Object>();