Note : I don't want to have to load the full json in-memory to append my data.
Basically, you can't. You would have to parse the full data structure, so that your write(..)
would know where to write. Otherwise, it's just appending somewhere and that might break the JSON format.
So read the JSON from the file, generate a JsonArray
from it. Create a new JsonObject
from your values. Add it to the array. Then write the full array.