XML to JSON conversion works properly now