Skip to content

Commit

Permalink
still no #69
Browse files Browse the repository at this point in the history
  • Loading branch information
dcooley committed May 28, 2020
1 parent e010a35 commit 54ae6e6
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 39 deletions.
3 changes: 3 additions & 0 deletions inst/include/jsonify/from_json/from_json.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#ifndef R_JSONIFY_FROM_JSON_H
#define R_JSONIFY_FROM_JSON_H

#include "jsonify/jsonify_types.hpp"

#include <Rcpp.h>


#include "from_json_utils.hpp"
#include "simplify/simplify.hpp"

Expand Down
40 changes: 1 addition & 39 deletions inst/include/jsonify/jsonify.hpp
Original file line number Diff line number Diff line change
@@ -1,45 +1,7 @@
#ifndef R_JSONIFY_H
#define R_JSONIFY_H

#include "rapidjson/document.h"

#include <RcppCommon.h>

namespace Rcpp {

template< typename T > SEXP wrap( const rapidjson::Value::ValueType& obj );

namespace traits {

} // traits
} // Rcpp




#include <Rcpp.h>



namespace Rcpp {

template< typename T >
SEXP wrap( const rapidjson::Value::ValueType& obj) {
const int RTYPE = Rcpp::traits::r_sexptype_traits< T >::rtype;

return Rcpp::wrap< RTYPE >( obj.Get< T >() );
}


namespace traits {


} // traits
} // Rcpp




#include "jsonify_types.hpp"

#include "rapidjson/writer.h"
#include "rapidjson/stringbuffer.h"
Expand Down
43 changes: 43 additions & 0 deletions inst/include/jsonify/jsonify_types.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#ifndef R_JSONIFY_TYPES_H
#define R_JSONIFY_TYPES_H

#include "rapidjson/document.h"

#include <RcppCommon.h>

namespace Rcpp {

template< typename T > SEXP wrap( const rapidjson::Value& obj );

namespace traits {

} // traits
} // Rcpp




#include <Rcpp.h>



namespace Rcpp {

template< typename T >
SEXP wrap( const rapidjson::Value& obj) {

const int RTYPE = Rcpp::traits::r_sexptype_traits< T >::rtype;

return Rcpp::wrap< RTYPE >( obj.Get< T >() );
}


namespace traits {


} // traits
} // Rcpp



#endif

0 comments on commit 54ae6e6

Please sign in to comment.