When working with Java, I need to create a JSON structure similar to this:
[ [ timestamp , number ],[ timestamp , number ] ]
This structure is necessary for displaying data on Highcharts graphs.
I initially used a "LinkedList of LinkedList" format to achieve this JSON structure, and surprisingly it worked as expected.
However, I'm curious if there are alternative methods that can be used instead of the unconventional "LinkedList of LinkedList" approach.
EDIT:
To clarify my question further, I am not seeking assistance on how to convert arrays into JSON. Rather, I am looking for suggestions on what initial structure to use before conversion.
In addition to the "LinkedList of LinkedLists" format, other structures could be considered, such as:
[ [ x, y ] , [ z, k ] , ... ]