Something for my fellow push-it-to-the-limit Marketo pros.
Discovered this when sending a ton of debug info back from a custom deduplication webhook. (Not to map that info to Marketo fields, only to check the Call Webhook activity details.)
After 10 KB the response is truncated, meaning it becomes broken JSON overall and Response Mappings won’t work, even if the “real” fields were at the top.
Be choosy about what you return for debugging. And don’t try to debug and get production/final responses at the same time.
It’s rare to worry about the total byte size of a JSON response. Serializing to JSON is the last step — and may even be done automatically outside of your userland code. Until you serialize, you won’t know how many bytes are added by quotes, semicolons, and escapes, and how many are subtracted by removing undefined
entries. You’d need to pre-serialize, check the length of the result and then go back and truncate certain values. Not fun at all!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.