JSON without reflection was: Native image compilation error

Jaroslav Tulach jaroslav.tulach at oracle.com
Mon Nov 20 12:15:49 UTC 2017


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

I hope you find it useful.
-jt



More information about the graal-dev mailing list