loadFromJSON function

Fill-in S4 object from the JSON content.