Skip to content

Conversation

@jranke
Copy link

@jranke jranke commented Mar 20, 2015

Thanks for this nice package!

In some cases (did not figure out when and when not), toJSON leads to representations like

> toJSON(x_2)
[1] "[ [\n \"Scenario\",\n\"Waterbody\", ....

instead of

> toJSON(x_1)
[1] "[ [ \"Scenario\", \"Waterbody\", ...

which makes python.assign fail with the message

SyntaxError: EOL while scanning string literal

This can be avoided by substituting the newline characters in the JSON string before it is passed to the Python interpreter.

I am not clear what the difference between the code in this github project and the r-forge project is, this also applies to the code on r-forge. I only submitted the fix here, as it is easier on github.

In some cases (did not figure out when and when not), toJSON leads to representations like

    > toJSON(x_2)
    [1] "[ [\n \"Scenario\",\n\"Waterbody\", ....

instead of

    > toJSON(x_1)
    [1] "[ [ \"Scenario\", \"Waterbody\", ...

which makes python.assign fail with the message

    SyntaxError: EOL while scanning string literal

This can be avoided by substituting the newline characters in the JSON string before it is passed to the Python interpreter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant