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

Rename the new JSON and ION expressions to less technical names (decode and encode can be confusing) #4451

Closed
anna-geller opened this issue Jul 28, 2024 · 2 comments · Fixed by #4465
Assignees
Labels
enhancement New feature or request kind/quick-win Seems to be quick to do

Comments

@anna-geller
Copy link
Member

Feature description

I think we've made a mistake here #4289 with the naming jsonEncode + jsonDecode + ionEncode and ionDecode - they seem too technical. (@loicmathieu you didn't do anything wrong by following the issue, mistake on my end with the too-technical naming)

Let's rename them to friendlier names before the release.

I think it's worth renaming as follows:

  1. jsonEncode --> toJson = Serializes a data structure into a JSON string
  2. jsonDecode --> fromJson = Deserializes a JSON string into a data structure
  3. ionEncode --> toIon = Serializes a data structure into an ION string
  4. ionDecode --> fromIon = Deserializes an ION string into a data structure

pseudo-code:

json_string = toJson(data)
data = fromJson(json_string) 

pebble:

{{ [1, 2, 3] | toJson  }} # "[1,2,3]"
{{ fromJson( '{"name": "kestra", "year": 2024}' ).name }} # kestra

After we rename, I'll update the Breaking Changes notes

@loicmathieu
Copy link
Member

We don't have ionEncode filter, it was not listed in the original issue: #3715
@anna-geller Should I add it ?

@anna-geller
Copy link
Member Author

yes, let's add it for consistency 👍

@github-project-automation github-project-automation bot moved this from Backlog to Done in Issues Jul 29, 2024
anna-geller added a commit to kestra-io/docs that referenced this issue Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request kind/quick-win Seems to be quick to do
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants