summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authoronionhammer <erik.m.oleary@gmail.com>2015-05-16 12:35:55 -0500
committeronionhammer <erik.m.oleary@gmail.com>2015-05-16 12:35:55 -0500
commit11457bc63b53d1ba7215a19fb8663ec215a2f151 (patch)
tree292febf4adaccc07c6f797d700c32593d6fc20c1 /lib/pure
parentf1343e52e0c079eb11027d6337ba494f22202488 (diff)
downloadNim-11457bc63b53d1ba7215a19fb8663ec215a2f151.tar.gz
Fixed indentation (2 spaces)
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/json.nim42
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/pure/json.nim b/lib/pure/json.nim
index 8389411c2..afb5fc1b1 100644
--- a/lib/pure/json.nim
+++ b/lib/pure/json.nim
@@ -956,34 +956,34 @@ proc toUgly*(result: var string, node: JsonNode) =
   var comma = false
   case node.kind:
   of JArray:
-      result.add "["
-      for child in node.elems:
-          if comma: result.add ","
-          else:     comma = true
-          result.toUgly child
-      result.add "]"
+    result.add "["
+    for child in node.elems:
+      if comma: result.add ","
+      else:     comma = true
+      result.toUgly child
+    result.add "]"
   of JObject:
-      result.add "{"
-      for key, value in items(node.fields):
-          if comma: result.add ","
-          else:     comma = true
-          result.add "\""
-          result.add key.escapeJson()
-          result.add "\":"
-          result.toUgly value
+    result.add "{"
+    for key, value in items(node.fields):
+      if comma: result.add ","
+      else:     comma = true
+      result.add "\""
+      result.add key.escapeJson()
+      result.add "\":"
+      result.toUgly value
       result.add "}"
   of JString:
-      result.add "\""
-      result.add node.str.escapeJson()
-      result.add "\""
+    result.add "\""
+    result.add node.str.escapeJson()
+    result.add "\""
   of JInt:
-      result.add($node.num)
+    result.add($node.num)
   of JFloat:
-      result.add($node.fnum)
+    result.add($node.fnum)
   of JBool:
-      result.add(if node.bval: "true" else: "false")
+    result.add(if node.bval: "true" else: "false")
   of JNull:
-      result.add "null"
+    result.add "null"
 
 proc toUgly*(node: JsonNode): string =
   ## Converts `node` to its JSON Representation on one line.