Result.pm: Add JSON serializer