Follow

Library API naming poll! Which makes more sense? :boost_requested:

· · Web · 3 · 2 · 1

@joepie91
I'd use "parse" and "format", but "stringify" is fine too.
I wouldn't use "encode" and "decode" since JSON is not an encoding.

@joepie91 I've voted for the 'decode'/'encode' pairs, but I also might be a little biased: I've already worked with 'decodeCBOR'/'encodeCBOR' style libraries.

On a second thought, I find the 'decode'/'encode' fits particularly well for binary formats (such as CBOR), while for text encodings (like JSON) I have a much softer preference for one or another.

Sign in to participate in the conversation
Pixietown

Small server part of the pixie.town infrastructure. Registration is closed.