[Doc] Use byte[] as example instead of String

Closes #8973.
This commit is contained in:
David Pilato 2015-01-02 16:20:11 +01:00
parent f45e6ae3f9
commit a50d82c44b

View File

@ -45,8 +45,7 @@ String json = "{" +
[[using-map]]
==== Using Map
Map is a key:values pair collection. It represents very well a JSON
structure:
Map is a key:values pair collection. It represents a JSON structure:
[source,java]
--------------------------------------------------
@ -87,7 +86,7 @@ import com.fasterxml.jackson.databind.*;
ObjectMapper mapper = new ObjectMapper(); // create once, reuse
// generate json
String json = mapper.writeValueAsString(yourbeaninstance);
byte[] json = mapper.writeValueAsBytes(yourbeaninstance);
--------------------------------------------------