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

Add format attribute to endpoint info #875

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

linhaojun857
Copy link
Contributor

fix #608

Copy link
Member

@lganzzzo lganzzzo left a comment

Choose a reason for hiding this comment

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

Looks good.
See minor comment

* set context ptr
* @param contextPtr
*/
void setContextPtr(void* contextPtr);
Copy link
Member

Choose a reason for hiding this comment

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

Since this PR concerns mapper only - let us not add additional methods to ConsistentOutputStream.

Instead, let's pass some kind of context object directly to the serializer's serialize(stream, value, <context>); method.

@@ -247,6 +247,7 @@ void Serializer::serializeObject(Serializer* serializer,
(first) ? first = false : stream->writeSimple(",", 1);
serializeString(stream, field->name, static_cast<v_buff_size>(std::strlen(field->name)), serializer->m_config->escapeFlags);
stream->writeSimple(":", 1);
stream->setContextPtr(&field->info);
serializer->serialize(stream, value);
Copy link
Member

Choose a reason for hiding this comment

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

Let's pass context directly to serialize method

@lganzzzo
Copy link
Member

Please note that this PR most probably will also be postponed due to the new functionality planned - see #879

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.

Keep decimal places at 2 decimals for serializing DTO float value
2 participants