Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
eliasayyy
Super User
Super User

GA4 connector error

i keep getting this error in power query 

DataFormat.Error: We found an unexpected character in the JSON input.
Details:
Value=\31
Position=0

2 REPLIES 2
Shabyman2
Frequent Visitor

Hi,

We are experiencing the same issue, this is PBI Desktop > GA connector > Valid credentials.

Surely this is a Microsoft bug it needs to fix? How can i edit a JSON coming through your connector in GA4? Is this something we have to do in GA4? Or a code change within the advanced editor with powerbi desktop?

v-jialongy-msft
Community Support
Community Support

Hi @eliasayyy 

The error message you're encountering in Power Query, "DataFormat.Error: We found an unexpected character in the JSON input," typically occurs when the JSON data you're trying to import or process has a formatting issue. Here are some steps to troubleshoot and resolve this error:

  1. Check JSON Format: Ensure that the JSON file or string you're trying to load is correctly formatted. The error indicates that there's an unexpected character ( ‘\31’ in this case) at the very beginning of the JSON data (Position=0). This could be a hidden character, a typographical error, or a formatting issue.

  2. Remove Hidden Characters: Sometimes, JSON files can contain hidden or non-printable characters that aren't visible in standard text editors. You can use a JSON validator or a text editor that shows all characters, including non-printable ones, to check for and remove any such characters.

  3. Use a JSON Validator: Run your JSON data through a JSON validator tool. These tools can help identify formatting issues or syntax errors in JSON data. They're widely available online.

  4. Encoding Issues: The issue might be due to encoding problems. Ensure that your JSON file is saved with the correct encoding (usually UTF-8). If you're getting the JSON data from an external source, check the encoding and make sure it's compatible with Power Query.

  5. Check for Data Corruption: If the JSON data comes from a file, ensure that the file is not corrupted. Try reloading or regenerating the JSON file if possible.

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.