FAQ
Andrew, Do you have plan to add method SkipEmpty that overwritable to json
Decoder?
jd := json.NewDecoder(os.Stdin)
jd.SkipEmpty = func(scan scan.Scanner) {
   // skip whitespace or C/C++ like comment syntaxs.
   ...
}
id.Decode(value)
On Wednesday, September 25, 2013 11:09:41 AM UTC+9, Andrew Gerrand wrote:

You might want to add some documentation to README.md or the
jsonpreprocess package comment that describes the acceptable comment syntax.


On 25 September 2013 12:04, Hiroaki Nakamura <hnak...@gmail.com<javascript:>
wrote:
Hi Andrew.

No, JSON cannot have comments.

However, we would like to add comments to JSON in documents.
This is why I created this pre-processor.

It trims comment in "JSON" and outputs the valid JSON.



2013/9/25 Andrew Gerrand <a...@golang.org <javascript:>>
On 25 September 2013 10:31, Hiroaki Nakamura <hnak...@gmail.com<javascript:>
wrote:
- trim comments

JSON can have comments?!


--
中村 弘輝 )Hiroaki Nakamura)
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 7 of 9 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedSep 25, '13 at 12:31a
activeSep 27, '13 at 1:33a
posts9
users5
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase