[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can the json reader be a bit more lenient?
From: |
Alex Kost |
Subject: |
Re: Can the json reader be a bit more lenient? |
Date: |
Sat, 03 Aug 2019 19:14:52 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
ndame (2019-07-31 13:52 +0200) wrote:
> Lately I've been using emacs for some text data processing, and the
> input is json sometimes. The problem is the json often comes like
> this:
>
> [{'time1: '8:00', 'time2': '13:00', ...
>
> and the emacs reader chokes on it saying
>
> doesn't start with "!
This error comes from 'json-read-string' function.
> Now I know the json standard says attribute names should be double quoted,
> but can it be somehow persuaded to accept single quotes instead?
Not easily: I think the only way is to override the mentioned function.
> It would be great to have an option for this when I know the data is
> correct, only it uses single quotes instead of doubles.
I think this feature request should be sent with "M-x report-emacs-bug".
It's unlikely it will be noticed on this mailing list.
--
Alex
- Re: Can the json reader be a bit more lenient?,
Alex Kost <=