-
-
Notifications
You must be signed in to change notification settings - Fork 496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
json_ParseString handling of new line (\n) #270
Comments
I would suggest the following:
|
@zgrose Thanks for raising this issue, @Sophist-UK looks good to me, I'll make this change |
Sophist-UK
added a commit
to Sophist-UK/VBA-JSON
that referenced
this issue
Jan 9, 2017
Addresses VBA-tools#41. Fix as per discussion in VBA-tools/VBA-Web#270
Sophist-UK
added a commit
to Sophist-UK/VBA-Web
that referenced
this issue
Jan 9, 2017
Resolves VBA-tools#270 and VBA-tools/VBA-JSON#41. See VBA-tools/VBA-JSON#44 for matching fix to VBA-JSON.
(moved to VBA-JSON) |
If the JSON fix was applied and then made it into VBA-WEB from there, then #272 should probably be closed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe the n case in json_ParseString should be changed to append a vbLf instead of a vbCrLf or there should be an option to override the default behavior (I copied the current code into this issue at the bottom).
I noticed this issue when assigning a value to a TextBox.
My JSON was (simplified): { "Prop" : "Foo \r\nBar" }
In the Immediate window this shows
Foo
Bar
But when I assign that value to a TextBox that is MultiLine=True and EnterKeyBehavior=True
the form shows Foo Bar in the TextBox.
If I change the JSON text to be { "Prop" : "Foo \nBar" } it displays properly.
If I change your code from vbCrLf to vbLf it displays properly.
I believe this is also a "truer" conversion for \n
Current code from 4.1.1
The text was updated successfully, but these errors were encountered: