Either, depending on your taste and use-case. I prefer XML for aesthetic reasons, but that format can get verbose. Check out my new post on how to read JSON files in your C++ code at http://www.parresianz.com/c++/json/json-input/.
Mechanics research codes are typically written by graduate students who aim to get their work done as quickly as possible. These codes are not meant to last beyond the publication of a few related papers. These files have the advantage that they can be read in quickly using an input file stream and the code for doing that can be written in minutes.
Computational mechanics practitioners are not typically known for practising well-established software engineering techniques. That makes code developed by various research groups next to impossible to understand and modify. I still see requests on iMechanica on how to implement Drucker-Prager models when every freshman student probably has their own implementation. It is likely that the person who developed a particular code cannot themselves understand the code a few years after the relevant paper has been published.
Continuing yesterday's thread on new C++ productivity tools, here's another one on using clang-tidy to modernize your code automatically to C++11/14. Life becomes markedly easier after the code has been updated. Check out my post at http://www.parresianz.com/c++/clang-tidy/ to see how I've integrated clang-tidy into my toolchain.
Some of you may be involved in computational work where your students develop C++ codes. If the code is formatted well it's easier to read and understand. With the creation of clang-format, the job of formatting (and not just indentation) can now be automated to a great extent. For a few pointers on how-to, check out my post at http://www.parresianz.com/c++/clang-format/.
The new blog post discusses yet another application of the Linear Assignment Problem; in this case the use of the Hungarian algorithm for finding an optimal list of close data points to a set of point generated using Latin Hypercube sampling. See http://www.parresianz.com//sampling/hungarian_algorithm/