Permalink
Browse files

serialize now handles number more accurately

  • Loading branch information...
1 parent 7688b49 commit 6c29f94dd014ffc026715b1a770015aa8d820dd9 @spkrka spkrka committed Jan 2, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 j2se/resources/serialize.lua
View
5 j2se/resources/serialize.lua
@@ -56,6 +56,11 @@ local function stringSerialize(buf, value)
end
typeSerialize["string"] = stringSerialize
+local function numberSerialize(buf, value)
+ append(buf, string.format("%.17g", value))
+end
+typeSerialize["number"] = numberSerialize
+
local keywords = {}
keywords["and"] = 1
keywords["or"] = 1

0 comments on commit 6c29f94

Please sign in to comment.