Table of Contents

Article

The data flow cannot parse JSON records

The following exception occurs when you start processing a data flow run:

Cannot parse JSON <specific information about a data flow shape>

The error message usually points at the Source shape of type Stream in the data flow rule as the place where the error occurred.

Cause

This error is caused by incorrectly formatted JSON input records in the data set.

Solution

To eliminate this error, perform the following steps:

  1. Review the error details to find which shape in the data flow contains the incorrectly formatted JSON input records that caused the error. For more information, see Tips for troubleshooting data flow rules.
    Click View input record to view the record that caused the error.
  2. Update the JSON formatting based on the root cause of the error.

Example

The following example input record contains incorrectly formatted JSON:

<code class="language-json"><pagedata>
 <pyFaultReason>
  { "CellIdCaller": "1", "CallRecipient": "1", "CellIDRecipient": "1", "CallDirection": "1", "SubscriptionID": "S-892","TerminationCode": "1", "CallDuration": "20", "CDRMapping": {} "CallID": "1"
 </pyFaultReason>
 <pxObjClass>Embed-Error</pxObjClass>
</pagedata></code>

The following example error message identifies the root cause of the incorrect formatting:

<code class="language-json">Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('"' (code 34): was expecting comma to separate OBJECT entries
at [Source: com.pega.dsm.dnode.util.ClipboardPageJsonConverter$ByteBufferInputStream7158ccb7; line: 1, column: 185]</code>

Based on the above examples, you can conclude that the error is caused by a missing comma between the CDRMapping and CallID properties in the JSON input record.

Published September 6, 2016 — Updated November 29, 2016


100% found this useful

Related Content

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.