Cleanup and use builtin json if available