builder methods, a convenient approach to constructing classes since Java doesn't have named arguments
JSON support with Gson
Internally I plan on using Gson to help with JSON serialization.
I'm going to require a .toJson() method as well as a custom serializer for every type that needs to have different JSON output, e.g. Namespace I'll use id, rangeStart, and rangeEnd properties, but in JSON it's expected to be ["some_id", 0, 0.6] for example.
You can see the Namespace tests for an example.
Docs
Adds some generated docs.
Unfortunately, getting the Java docs picked up for the Lombok-generated methods is going to be a bit of error. Lombok offers Delombok, a tool that you can use to de-Lombok. I've read that this can help with the Java doc generation. I've created a ticket for this: https://github.com/growthbook/growthbook-sdk-java/issues/4
Code generation with Lombok
These changes add Lombok for generating:
JSON support with Gson
Internally I plan on using Gson to help with JSON serialization.
I'm going to require a
.toJson()
method as well as a custom serializer for every type that needs to have different JSON output, e.g.Namespace
I'll useid
,rangeStart
, andrangeEnd
properties, but in JSON it's expected to be["some_id", 0, 0.6]
for example.You can see the Namespace tests for an example.
Docs
Adds some generated docs.
Unfortunately, getting the Java docs picked up for the Lombok-generated methods is going to be a bit of error. Lombok offers Delombok, a tool that you can use to de-Lombok. I've read that this can help with the Java doc generation. I've created a ticket for this: https://github.com/growthbook/growthbook-sdk-java/issues/4