on master help sign in
Proper handling of String +123 serialization (fixes #64)
438f0bcMichael Snoyman
ChangeLog.md+4
@@ -1,3 +1,7 @@
1+## 0.8.12
2+
3+* Proper handling of `String "+123"` [#64](https://github.com/snoyberg/yaml/issues/64)
4+
1## 0.8.11
5## 0.8.11
2
6
3* Function to print prettier parse exceptions [#59](https://github.com/snoyberg/yaml/pull/59)
7* Function to print prettier parse exceptions [#59](https://github.com/snoyberg/yaml/pull/59)
Data/Yaml.hs+1
@@ -158,6 +158,7 @@ isNumeric =
158 || c == 'E'
158 || c == 'E'
159 || c == '.'
159 || c == '.'
160 || c == '-'
160 || c == '-'
161+ || c == '+'
161
162
162decode :: FromJSON a
163decode :: FromJSON a
163 => ByteString
164 => ByteString
test/Data/YamlSpec.hs+3
@@ -140,6 +140,9 @@ spec = do
140
140
141 it "aliases in keys #49" caseIssue49
141 it "aliases in keys #49" caseIssue49
142
142
143+ it "serialization of +123 #64" $ do
144+ D.decode (D.encode ("+123" :: String)) `shouldBe` Just ("+123" :: String)
145+
143
146
144specialStrings :: [T.Text]
147specialStrings :: [T.Text]
145specialStrings =
148specialStrings =
yaml.cabal+1−1
@@ -1,5 +1,5 @@
1name: yaml
1name: yaml
2−version: 0.8.11
2+version: 0.8.12
3license: BSD3
3license: BSD3
4license-file: LICENSE
4license-file: LICENSE
5author: Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov
5author: Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov