FAQ
It seems to me like a regexp could be easily fooled in most cases with
carefully constructed input. I think you'll need a package that exposes the
parse tree in some way. I'm not aware of any such functionality in the
standard library.

Instead of stream offsets it may be simpler for users if paths are used
instead (e.g. "foo.bar[1].baz is not a valid so and so"). But, constructing
the paths in the simplest manner is a problem in itself.
On Tuesday, April 9, 2013 1:15:45 AM UTC-7, Johann Höchtl wrote:

The json package helps me a lot to extract data from an otherwise very
verbose json file. I later perform checks on that data I have in my
structs. When I encounter issues I would like to highlight those issues,
but that would require to know the offset in the json stream, where the
struct item has been parsed.

Is there any support for this in the json package or do I have to search
through the json on my own (using eg. a regexp)

Thank you , Johann
--
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 | 2 of 3 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedApr 9, '13 at 8:15a
activeApr 9, '13 at 10:22a
posts3
users2
websitegolang.org

2 users in discussion

Johann Höchtl: 2 posts Bryan Matsuo: 1 post

People

Translate

site design / logo © 2021 Grokbase