Add JSON load capabilities

On the second thought it will be better to get this merged before whitespace fixes as it will produce conflicts.