What’s the best approach to handling inconsistentl...
# singer-tap-development
r
What’s the best approach to handling inconsistently typed JSON data in a tap built with the SDK? Example 1:
Copy code
{
  "error": "something went wrong"
}
Copy code
{
  "error": {
    "message": "something went wrong"
  }
}
Example 2:
Copy code
{
  "scope": "profile email connect"
}
Copy code
{
    "scope": [
        "profile"
        "email",
        "connect"
    ]
}
Up to now, we have been using
Stream::post_process
to unify record property types. This works, but doesn’t feel like a great solution to scale and maintain in the future. Ideally the API would return data in a consistent format - that would be great! Is this something the tap should be responsible for, or does it suit a target (or even a mapper) more? Context: • https://github.com/Matatika/tap-auth0/pull/4https://github.com/Matatika/tap-auth0/pull/5