Initial split of internal and external api types.

Maybe I am missing something - without a JSONBase, these test case should all fail to encode, no?