Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate incorrectly named "Append" and implement "Push", "Concat" and "Merge" #30

Open
Southclaws opened this issue Sep 30, 2019 · 0 comments

Comments

@Southclaws
Copy link
Owner

After some confusion I've realised that the JsonAppend function is named incorrectly!

Appending is adding a single item to a collection of items however the current API expects the input and destination to either be both arrays or both objects. This is actually concatenation not appending.

So, the existing JsonAppend function should be marked deprecated and two new functions introduced:

  • JsonPush this is purely for arrays where you want to push a single item to the end.
  • JsonConcat does exactly what JsonAppend does but only for arrays.
  • JsonMerge does exactly what JsonAppend does but only for objects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant