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

API: encode/decode vs dump/load #58

Open
hinell opened this issue May 15, 2023 · 1 comment
Open

API: encode/decode vs dump/load #58

hinell opened this issue May 15, 2023 · 1 comment

Comments

@hinell
Copy link

hinell commented May 15, 2023

Hi.

I propose to stick to a more common names for encoding/decoding of API:

...
local        luatable = { ... }
local        lyaml.encode(luatable)
yamlString = lyaml.decode(...)

The naming is currently not obvious. Thanks!

@alerque
Copy link

alerque commented May 15, 2023

The load() and dump() are pretty common names for this kind of actions, including in the Lua core (e.g. load) and in other YAML/JSON/other data format libraries. Of course there are counter examples even of other Lua YAML using encode()/decode() (especially ones that are bindings to other-language libraries. I'm just suggesting there isn't a clear cut normalized naming scheme to follow here.

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

2 participants