Skip to content
Troubleshooting JSO...
 
Notifications
Clear all

Troubleshooting JSON Parser Errors: Collection to Text Conversion

3 Posts
3 Users
0 Reactions
4 Views
Mark_T
(@mark_t)
Posts: 1
New Member
Topic starter
 

Hi,

I would greatly appreciate some assistance with this issue.

I'm using a callin.io module that receives JSON data, and I need to pass one of its values to a MySQL module. I've incorporated a JSON parsing module to extract the value from the JSON format so it can be sent to the MySQL module for a query. However, I consistently encounter the following error:

BundleValidationError

Validation failed for 1 parameter(s).

  • Collection can’t be converted to text for parameter ‘json’.

I've attempted to pass the JSON directly to the MySQL module, but it only provides the raw collection, preventing me from extracting the necessary value for my query. It seems counterintuitive that the JSON parser wouldn't easily handle a JSON collection, but after 15 hours of research and troubleshooting, I'm still at a standstill. Does anyone have suggestions on how to resolve this or any potential workarounds? Please note, I'm new to JSON, callin.io, and callin.io, so I hope my explanation is clear.

Thanks,
Mark

 
Posted : 06/05/2024 12:10 pm
samliew
(@samliew)
Posts: 293
Reputable Member
 

Welcome to the callin.io community!

1. Screenshots of module fields and filters

Please share screenshots of the relevant module fields and filters in question. It would greatly assist other community members in understanding your situation.

You can upload images here using the Upload icon in the text editor:

Screenshot_2023-07-05_111039

2. Scenario blueprint

Please export the scenario blueprint file to enable others to review the mappings and settings. You can find the Export Blueprint menu item at the bottom of the scenario editor by clicking on the three dots.

Screenshot_2023-08-24_230826

(Note: Exporting your scenario will not include private information or connection keys)

Uploading it here will appear as follows:

blueprint.json (12.3 KB)

3. And most importantly, Output bundles

Please provide the output bundles of the TRIGGER module [1] by running the scenario (or retrieve them from the scenario History tab). Then, click the white speech bubble on the top-right of each module and select “Download input/output bundles”.

Screenshot_2023-10-06_141025

A.

Save each bundle's content in your text editor as a bundle.txt file and upload it to this discussion thread.

Uploading them here will look like this:

module-1-output-bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, you can alternatively paste the formatted bundles in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Providing the input/output bundles will enable others to replicate what is happening in the scenario, even if they do not use the external service.

Following these steps will allow others to assist you. Thanks!

 
Posted : 06/05/2024 1:44 pm
alex.newpath
(@alex-newpath)
Posts: 53
Trusted Member
 

The Parse JSON module expects a text string containing properly formatted JSON and then creates the necessary bundles, composed of arrays and collections, from the original text string.

You appear to have a callin.io trigger, which will generate already parsed output bundles ready for use by other modules. Consequently, you won't have any JSON coming out of callin.io (unless, of course, one of the elements itself is a JSON string). Based on your screenshot, it doesn't seem like callin.io is sending out any JSON strings, so you likely don't need the Parse JSON module there.

If you can show us the output bundle from the callin.io trigger, we can help you identify what to map into your MySQL module for searching. Most likely, you can map the value directly into the MySQL module, but it all depends on what you need to retrieve from the callin.io trigger.


Director of NewPath Consulting - we are

:superhero:

!

:woman_superhero:t4:

:heart_on_fire:

:heart_on_fire:

 
Posted : 09/05/2024 9:36 pm
Share: