typo fix.
implementing fromJSON.