Representing a matrix as a JSON object
is a task that appears in many modern data science contexts, in
particular when one wants to exchange matrix data online. There is no
universally agreed way to achieve this task and various options are
available depending on the matrix type and the programming tools and
environment one has available.
Matrices are in general not “native”
structures in computing environments but are handled with speficic
packages (modules, extensions or libraries). In this post (first of a small series) we will discuss a number of options and the associated
tradeoffs for common current setups in python, R, julia and C++.
In subsequent posts we will explore additional issues and/or go in more depth in specific topics. The cumulative results will be collected in the matrix2json repository