json as method