Json api

@jimfleming you merged my pull request before I could make these changes :p 

adds `jsfmt.formatJSON` and `jsfmt.validateJSON` as well as some basic tests for both.