nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
990d289
)
lib/json: Implemented `pretty_json_visit` on JsonParseError
author
Lucas Bajolet
<r4pass@hotmail.com>
Fri, 6 May 2016 15:43:09 +0000
(11:43 -0400)
committer
Lucas Bajolet
<r4pass@hotmail.com>
Fri, 6 May 2016 15:43:09 +0000
(11:43 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
lib/json/static.nit
patch
|
blob
|
history
diff --git
a/lib/json/static.nit
b/lib/json/static.nit
index
7c0e2cf
..
565da1f
100644
(file)
--- a/
lib/json/static.nit
+++ b/
lib/json/static.nit
@@
-439,6
+439,11
@@
redef class JsonParseError
"\"position\":{position.to_json}," +
"\"message\":{message.to_json}\}"
end
+
+ redef fun pretty_json_visit(buf, indents) do
+ buf.clear
+ buf.append(to_json)
+ end
end
redef class Position