Skip to content

I/O error in JSON read #675

Description

@andychu

After #672


I looked into it more, and while I didn't find the exact issue, the py-yajl binding we're using for JSON isn't great. It needs to use a more straightforward loop like the example here.

https://lloyd.github.io/yajl/

$ bin/osh -c 'json read :x < configure'
lexical error: invalid char in json text.
                                       #!/bin/sh # # POSIX shell scrip
                     (right here) ------^
  json read :x < configure
       ^~~~
[ -c flag ]:1: json read: parse error
Error closing descriptor 0: [Errno 9] Bad file descriptor
osh I/O error: Bad file descriptor


Though it doesn't look like the binding closes the file descriptor, which would be the obvious bug

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions