added methods for FromJson code generation. (unfinished)