You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Michael Park (JIRA)" <ji...@apache.org> on 2015/12/22 02:06:46 UTC

[jira] [Updated] (MESOS-4237) Introduce `jsonify` to stout.

     [ https://issues.apache.org/jira/browse/MESOS-4237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Park updated MESOS-4237:
--------------------------------
    Description: 
This ticket is to track the {{jsonify}} function being added to stout.

A quick example:

{code}
namespace store {

struct Customer
{
  std::string first_name;
  std::string last_name;
  int age;
};

void json(JSON::ObjectWriter* writer, const Customer& customer)
{
  writer->field("first name", customer.first_name);
  writer->field("last name", customer.last_name);
  writer->field("age", customer.age);
}

} // namespace store {

store::Customer customer{"michael", "park", 25};
std::cout << jsonify(customer) << std::endl;
// prints: {"first name":"michael","last name":"park","age":25}
{code}

Refer to the design doc at MESOS-4236

  was:
This ticket is to track the {{jsonify}} function being added to stout.

A quick example:

{code}
namespace store {

struct Customer
{
  std::string first_name;
  std::string last_name;
  int age;
};

void json(JSON::ObjectWriter* writer, const Customer& customer)
{
  writer->field("first name", customer.first_name);
  writer->field("last name", customer.last_name);
  writer->field("age", customer.age);
}

} // namespace store {

store::Customer customer{"michael", "park", 25};
std::cout << jsonify(customer) << std::endl;
// prints: {"first name":"michael","last name":"park","age":25}
{code}


> Introduce `jsonify` to stout.
> -----------------------------
>
>                 Key: MESOS-4237
>                 URL: https://issues.apache.org/jira/browse/MESOS-4237
>             Project: Mesos
>          Issue Type: Task
>            Reporter: Michael Park
>            Assignee: Michael Park
>              Labels: mesosphere
>
> This ticket is to track the {{jsonify}} function being added to stout.
> A quick example:
> {code}
> namespace store {
> struct Customer
> {
>   std::string first_name;
>   std::string last_name;
>   int age;
> };
> void json(JSON::ObjectWriter* writer, const Customer& customer)
> {
>   writer->field("first name", customer.first_name);
>   writer->field("last name", customer.last_name);
>   writer->field("age", customer.age);
> }
> } // namespace store {
> store::Customer customer{"michael", "park", 25};
> std::cout << jsonify(customer) << std::endl;
> // prints: {"first name":"michael","last name":"park","age":25}
> {code}
> Refer to the design doc at MESOS-4236



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)