Skip to content

Destination plugins receive escaped data #622

@candiduslynx

Description

@candiduslynx

Describe the bug

JSON fields (and possibly others) receive escaped data, as was seen in cloudquery/cloudquery#7001.
The reason for this is that source plugins use json.Marshal that does escaping, but the destination plugins can't perform unmarshaling due to lack of original structure.
So, the data received has unicode characters escaped, and it might be written to the destination in the same way.

Expected Behavior

All values received by destination plugins should be unescaped.

Steps to Reproduce

  1. Create a tagged resource in Azure with key MyKey and value A&B.
  2. Run the destination plugin in debugger
  3. See that the value is received as {"MyKey":"A\u0026B"}, while it should've been presented as {"MyKey":"A&B"}

Possible Solution

Add preliminary unescape for the data in the destination.

Provider and CloudQuery version

latest

Additional Context

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions