strings with invalid json characters are now handled correctly#41
Open
travis-leith wants to merge 1 commit intothoth-org:mainfrom
Open
strings with invalid json characters are now handled correctly#41travis-leith wants to merge 1 commit intothoth-org:mainfrom
travis-leith wants to merge 1 commit intothoth-org:mainfrom
Conversation
|
Sorry, for the delay the problem with this proposition of encoder is that the decoder explicitly say that a Line 29 in 2a70134 In this case, I think you should write custom coders called Or shadow the |
|
I am closing but please feel free to discuss it further. |
|
Wait, I think I read the change wrong now that I see the linked issue to it. I will re-think my decision sorry about that. |
|
Hello, @travis-leith I am unable to produce failing test with the current version of Thoth.Json.Net. Code I tried: testCase "a string with new line works" <| fun _ ->
let expected = "\"a\\nb\""
let actual =
Encode.string "a\nb"
|> Encode.toString 4
equal expected actual
testCase "a string with new line character works" <| fun _ ->
let expected = "\"a\\\\nb\""
let actual =
Encode.string "a\\nb"
|> Encode.toString 4
equal expected actual
testCase "a string with tab works" <| fun _ ->
let expected = "\"a\\tb\""
let actual =
Encode.string "a\tb"
|> Encode.toString 4
equal expected actualCan you please provide me with a reproduction code for your error? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix for #40