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

Draft: Update README #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Draft: Update README #8

wants to merge 2 commits into from

Conversation

mcei
Copy link
Collaborator

@mcei mcei commented Feb 8, 2024

No description provided.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
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_.
Copy link
Member

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 ок.

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ты вот так предлагаешь?

Copy link
Member

Choose a reason for hiding this comment

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

Ага, так хорошо.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
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:
Copy link
Member

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.
Copy link
Member

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_.
Copy link
Member

Choose a reason for hiding this comment

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

Ага, так хорошо.

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

Successfully merging this pull request may close these issues.

2 participants