-
Notifications
You must be signed in to change notification settings - Fork 1
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
Draft: Update README #8
base: main
Are you sure you want to change the base?
Conversation
One can apply generator to _marks_ of json input. Each _mark_ is json key name. | ||
For example, `uuid` and `id` maybe used as _mark_. | ||
One can apply generator to _marks_ of json input. Each _mark_ is a json key name. | ||
For example, `uuid` and `id` can be used as _mark_. |
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.
Надо бы придумать пример получше, от этого куча wtf-ов вроде "зачем тут два id (и uuid, и id)?". Наверное, просто удалить uuid ок.
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.
For example, id
can be used as mark.
[
{
"id": 1234
},
{
"id": 1234
}
]
Mark can be renamed in result of operation. It depends on operation
mode and its rules.
Advice: wrap marks in special symbols, i.e. __id__
and unwrap during operation
.
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.
Ты вот так предлагаешь?
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.
Ага, так хорошо.
Type `GenerateFragmentBatchFunc` describes interface of generators. | ||
Key feature of generators is batch processing. Batches speed up result output. | ||
Type `GenerateFragmentBatchFunc` describes an interface of generators. | ||
Batch processing is a key feature of generators. Batches speed up the result output. | ||
|
||
Example: |
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.
Совсем непонятный пример, конечно. Для того, чтобы он был понятным, нужно добавить пример входного и выходного json-а. Добавить больше комментов в коде.
Возможно, не помешал бы какой-нибудь более жизненный и простой пример, а то сложно людям объяснить, в чём профит подклеивать поле url в объекты.
It works with rules that are combinations or marks and generators. | ||
|
||
The library guarantees a valid output json syntax on valid input json. | ||
Also, it is possible to generate a semantically invalid json if fragment generators are not correct. |
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.
Звучит как ещё одна приятная фича библиотеки, хотя это не так :)
Лучше без Also, а после этого предложения написать что-нибудь вроде "Test your fragment generators".
One can apply generator to _marks_ of json input. Each _mark_ is json key name. | ||
For example, `uuid` and `id` maybe used as _mark_. | ||
One can apply generator to _marks_ of json input. Each _mark_ is a json key name. | ||
For example, `uuid` and `id` can be used as _mark_. |
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.
Ага, так хорошо.
No description provided.