-
Notifications
You must be signed in to change notification settings - Fork 60
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
Improved the entry point of the documentation. #128
Conversation
Signed-off-by: Paul-Elliot <[email protected]>
There was a problem hiding this 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). |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
lib/yojson.cppo.mli
Outdated
|
||
- 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 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]>
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! |
Signed-off-by: Paul-Elliot <[email protected]>
Sure! I removed the json5 mention and implemented your comments. |
This PR adds an
index.mld
to improve the entry point of the documentation.It allows to:
yojson-bench
)I think that it solves #112 and #44.