Skip to content

Commit

Permalink
Adding the JSON_NUMERIC_CHECK flag in __toJson so that numberic strin…
Browse files Browse the repository at this point in the history
…gs are properly converted to numbers.
  • Loading branch information
dhrrgn committed Jan 29, 2013
1 parent 4da5969 commit 5ec2946
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Hal/Resource.php
Expand Up @@ -209,7 +209,7 @@ protected function _recurseLinks($links)
*/
public function __toJson()
{
return json_encode($this->toArray());
return json_encode($this->toArray(), JSON_NUMERIC_CHECK);
}
/**
*
Expand Down

0 comments on commit 5ec2946

Please sign in to comment.