I typically see XML used to store stuff in a file, whereas JSON I see more often over network applications to save bandwidth because of its slightly lower character use
There's no real reason you have to use one over the other, that's just what I see more.
I'd just use whichever one has more support (JSON in this case)
The biggest disadvantage i see to JSON is it doesn't have attributes like XML does
The format is basically {"key":"value","key":"value"}
You can have arrays: {"key":["one","two","three"]}
and objects {"key": { "key":"value","key":"value"}}
and all the further nesting you'd expect like objects in objects and arrays of objects and etc
For a more complex example,
here is your complex repository example in JSON format