agreement how a Matrix (2D) is stored as JSON?
I think the second format is clearly preferred. Each of
- math.js - a (popular?) javascript library which supports matrices,
- jsonlite - an R package which can encode/decode matrices (note that rjson and rjsonio don't seem to do this so well), and
- json-tricks -python/numpy json package
all declare matrices in the second format you suggest, in addition to jsonlab which you have mentioned.