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

Improved the entry point of the documentation. #128

Merged
merged 3 commits into from
Jan 31, 2022

Conversation

panglesd
Copy link
Collaborator

This PR adds an index.mld to improve the entry point of the documentation.

It allows to:

  • Hide packages that we do not want to include in the doc (such as yojson-bench)
  • Describe the library in a short page, without the details of the API.

I think that it solves #112 and #44.

Copy link
Member

@Leonidas-from-XIV Leonidas-from-XIV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is nice. While I am aware that most of it is just moving documentation around, I think some of it should be updated to not state things that aren't the case anymore.

doc/index.mld Outdated
The Yojson library provides runtime functions for reading and writing JSON
data from OCaml. It addresses a few shortcomings of its predecessor
json-wheel and is about twice as fast (2.7x reading, 1.3x writing; results
may vary).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the mention of json-wheel can be dropped, nobody has used this in many years and it is not maintained.

The design goals of Yojson are the following:
- Reducing inter-package dependencies by the use of polymorphic
variants for the JSON tree type.
- Allowing type-aware serializers/deserializers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that even true? I think we require everything to go through some Safe/Basic/Raw tree type.

doc/index.mld Outdated
- Allowing type-aware serializers/deserializers
to read and write directly without going through a generic JSON tree,
for efficiency purposes.
Readers and writers of all JSON syntaxic elements are provided
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"syntactic"? I am not a native speaker though.

Readers and writers of all JSON syntaxic elements are provided
but are undocumented and meant to be used by generated OCaml code.
- Distinguishing between ints and floats.
- Providing optional extensions of the JSON syntax.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be dropped since we don't aim to provide these going forward and are just keeping them around for now for compatibility.


- The {{!basic}Basic} JSON type,
- The {{!safe}Safe} JSON type, a superset of JSON with safer support for integers,
- The {{!raw}Raw} JSON type, a superset of JSON, safer but less integrated with ocaml types.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- The {{!raw}Raw} JSON type, a superset of JSON, safer but less integrated with ocaml types.
- The {{!raw}Raw} JSON type, a superset of JSON, safer but less integrated with OCaml types.

Signed-off-by: Paul-Elliot <[email protected]>
@panglesd panglesd added the no changelog Not a user visible change, does not require changelog entry label Jan 27, 2022
@panglesd
Copy link
Collaborator Author

I added a mention that one of the goal of yojson is to eventually support the json5 standard... I think that's a reasonable goal to have but I can remove this line if you prefer, as no work has started on this feature!

@Leonidas-from-XIV
Copy link
Member

@panglesd I have made a proposal in #106 and started an experimental implementation but I am not sure there is a consensus on it yet. I'd suggest we first decide what to do with that RFC :-)

Signed-off-by: Paul-Elliot <[email protected]>
@panglesd
Copy link
Collaborator Author

Sure! I removed the json5 mention and implemented your comments.
We'll discuss json5 in #105.

@panglesd panglesd merged commit 0fc0bb7 into ocaml-community:master Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Not a user visible change, does not require changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants