Skip to content
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

parseKey with Key containing ":" #21

Open
GoogleCodeExporter opened this issue Jun 12, 2015 · 0 comments
Open

parseKey with Key containing ":" #21

GoogleCodeExporter opened this issue Jun 12, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. parse any JSON with a key containing a ":" (like in google analytics api 
answers)

What is the expected output? What do you see instead?
EXP: normal parsing
GOT: infinity loop

check code beginnning at  this case-statement:
https://code.google.com/p/vba-json/issues/attachmentText?id=15&aid=150001000&nam
e=jsonlib.cls&token#276

I added an else clause to solve this:
        Case ":"
            If Not dquote And Not squote Then
                index = index + 1
                Exit Do
            Else
                If InStr(vbCrLf & vbCr & vbLf & vbTab & " ", char) Then
                Else
                    parseKey = parseKey & char
                End If
                index = index + 1
            End If

(didn't test this in depth - just for my case)

Original issue reported on code.google.com by [email protected] on 30 Sep 2014 at 2:20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant