Fixed json parser for empty array as input