I understand I am probably posing a confusing question, however, I would imagine many if not the vast majority of you would be familiar with this practice. I discovered it when working with PHP and an API. I haven't seen it used for years as languages have become more programmer friendly.
Context: I have a program that takes in X number pieces of data of arbitrary size. This data is passed through to an API that returns some information based on such given data sent.
Now, the API only has fields for x-1 pieces of data so to get around this I would concatenate two pieces of X, say x1 & x2, with a known character in between. I would generally use ":" in the case I'm describing so the API would be sent X-1 pieces of data, one of which being x1:x2. This x1:x2 piece would be part of what was returned so on the receiving script of my server I would write a simple function (possibly a method) to split this data on the ":" character, assigning one side to a variable and the other to another.
How would a professional computer scientist describe this technique?
Thank you kindly and I hope everyone reading this has a wonderful day. You matter.
CodePudding user response:
This is usually referred to as marshalling.