Mistake on method name
Methods toJson(),getJson() and toArray()