Skip to content
Browse files

Use pretty JSON

(See issue #10)
  • Loading branch information...
1 parent 274bd27 commit 764844b3457cb6b63678492688938e6097348d08 @dgl committed Jul 26, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/WWW/CPANGrep.pm
View
4 lib/WWW/CPANGrep.pm
@@ -27,11 +27,11 @@ sub dispatch_request {
my $r = $self->_search($q);
return [ 200, ['Content-type' => 'application/json' ],
- [ encode_json({
+ [ to_json {
count => $r->{count},
duration => $r->{duration},
results => [grep defined, @{$r->{results}}[0 .. $limit]]
- })]
+ }, { pretty => 1 } ]
];
}
},

0 comments on commit 764844b

Please sign in to comment.
Something went wrong with that request. Please try again.