JSON without reflection was: Native image compilation error

Leonardo Loch Zanivan leonardo.zanivan at gmail.com
Mon Nov 20 15:13:27 UTC 2017


Hi Jaroslav,

Thanks! I was not aware of this netbeans-html4j feature :)

I have a few scenarios that I may use it, but I also need compile existing
code that uses reflection (Jackson/Gson) to be working.

On Mon, Nov 20, 2017 at 10:16 AM Jaroslav Tulach <jaroslav.tulach at oracle.com>
wrote:

> Hello Leonardo.
>
> >> Jaroslav Tulach <jaroslav.tulach at oracle.com>: 20.11.17 @ 6:49 <<
> > >> Leonardo Loch Zanivan <pangalz at gmail.com>: 18.11.17 @ 21:10 <<
> > >
> > > All the JSON serializers I know uses Reflection APIs, so I suppose
> this is
> > > something to be supported in future releases.
> >
> > Hi. I wrote [Apache HTML/Java
> > API](https://github.com/apache/incubator-netbeans-html4j) and it can be
> > [used for parsing/serializing JSON](https://
> > dukescript.com/update/2015/01/27/ParsingJSON.html) without any need of
> > reflection. As such one can use this method in native-image without any
> > issues.
> >
> > Good luck.
>
> I have given it a try and here is a Maven example showing how to use the
> @Model based JSON parser with SubstrateVM:
>
> https://github.com/JaroslavTulach/incubator-netbeans-html4j/blob/examples/
> examples/jsonparse/README.md
> <https://github.com/JaroslavTulach/incubator-netbeans-html4j/blob/examples/examples/jsonparse/README.md>
>
> I hope you find it useful.
> -jt
>
>


More information about the graal-dev mailing list