Ticket #488 (new defect)

Opened 23 months ago

Empty file reports wrong error

Reported by: nculwell Owned by: dherman
Priority: minor Milestone:
Component: dherman/json.plt Keywords:
Cc: Version: (4 0)
Racket Version:

Description

When attempting to parse an empty JSON file, I found that instead of giving the correct error, which is "read: unexpected EOF", this module instead reports this error:

char-whitespace?: contract violation
expected: char?
given: #<eof>

This can fixed by changing the application of char-whitespace? in skip-whitespace to be "(and (char? ch) (char-whitespace? ch))".

Note: See TracTickets for help on using tickets.