Could you perhaps achieve this with reflect and UnmarshalJSON() ?

The following basic example compares against the case-sensitive json tag:

https://play.golang.org/p/Oe_tovxe9Ld

On Thu, 23 Sept 2021 at 14:23, 'Aaron' via golang-nuts <
golang-nuts@googlegroups.com> wrote:

> Hi all
>
> Anyone know of a JSON package (or other solution) which is case-sensitive
> when decoding - and is also mature, simple, and parses into a struct?
> I've looked at a few open-source packages, but the ones I've found seem to
> be focused on performance, or allowing you to access the JSON in different
> ways, or require code-generation, or something.
> Really I just want a drop-in replacement for encoding/json that is case
> sensitive.
> Wondering about forking the package myself... but obviously don't want to
> do that if there's an existing solution.
>
> Thanks
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/a3d25416-2490-4719-a38c-9f6a43008184n%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/a3d25416-2490-4719-a38c-9f6a43008184n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAB-c0PcZiy-RmBw_C4_6xEFm7rNqPbbknQtWUfzescM_K0eCMg%40mail.gmail.com.

Reply via email to