json api handler and samples; mini JSON encoder; detabbed