Generating automated tests for fromJson/toJson for api schema class + bug fixes

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//366223004