fb.add(new WKTReader().read("POINT(10 20)"));
SimpleFeature feature = fb.buildFeature("outbreak.1");
FeatureJSON fj = new FeatureJSON();
ByteArrayOutputStream os = new ByteArrayOutputStream();
fj.writeFeature(feature, os);
String json = os.toString();
// here it would break because the written json was incorrect
SimpleFeature feature2 = fj.readFeature(json);