Skip to content

Json workflow #19

Answered by d-frey
ShuP1 asked this question in Q&A
Discussion options

You must be logged in to vote

The following code should now work using the latest version:

// Copyright (c) 2020 Daniel Frey and Dr. Colin Hirsch
// Please see LICENSE for license or visit https://github.com/taocpp/taopq/

#include "../macros.hpp"

#include <tao/json.hpp>
#include <tao/pq.hpp>

#include <iostream>

namespace tao::json
{
   std::string to_taopq_param( const value& v )
   {
      return to_string( v );
   }

}  // namespace tao::json

namespace tao::pq
{
   template<>
   struct result_traits< json::value >
   {
      [[nodiscard]] static json::value from( const char* value )
      {
         return json::from_string( value );
      }
   };

}  // namespace tao::pq

void run()
{
   // open a connection
   

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by d-frey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #19 on December 21, 2020 12:38.