Skip to content

Commit ea2ac8a

Browse files
authored
Merge pull request #1202 from emmanuelbernard/1201
Issue 1201 Improve REST guide documentation
2 parents e8c416a + 6fa629b commit ea2ac8a

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

docs/src/main/asciidoc/rest-json-guide.adoc

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,12 @@ You can then point your browser to `http://localhost:8080/fruits.html` and use y
191191
The library we use to serialize Java objects to JSON documents is http://json-b.net/[JSON-B].
192192
It uses Java reflection to get the properties of an object and serialize them.
193193

194-
Most likely, you have understood already that using native images requires you to register the usage of reflection.
194+
Using native images with GraalVM, all classes that will be used with reflection need to be registered.
195+
The good news is that Quarkus does that work for you most of the time.
196+
So far, we haven't registered any class, not even `Fruit`, for reflection usage and everything is working fine.
195197

196-
So far, we haven't registered any class, even not `Fruit`, for reflection usage.
197-
However everything is working fine.
198-
199-
The fact is that Quarkus performs some magic when it is capable of inferring the serialized types from the REST methods.
200-
201-
When you have the following REST method, it is fairly easy to determine that `Fruit` will be serialized:
198+
Quarkus performs some magic when it is capable of inferring the serialized types from the REST methods.
199+
When you have the following REST method, Quarkus determines that `Fruit` will be serialized:
202200

203201
[source,JAVA]
204202
----
@@ -229,8 +227,7 @@ public Response list() {
229227
}
230228
----
231229

232-
As you can imagine, it is not possible for Quarkus to determine at build time the type included in the `Response` as the information is not available.
233-
230+
It is not possible for Quarkus to determine at build time the type included in the `Response` as the information is not available.
234231
In this case, Quarkus won't be able to automatically register for reflection the required classes.
235232

236233
This leads us to our next section.

0 commit comments

Comments
 (0)