Or, y'know, just
jo.put("previous", previous);
Rather than jo.put("previous", previous.toJson());
Presumably the reason they didn't do this is because they couldn't handle a recursive schema?