[ 
https://issues.apache.org/jira/browse/MINIFICPP-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16256163#comment-16256163
 ] 

ASF GitHub Bot commented on MINIFICPP-114:
------------------------------------------

Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/191#discussion_r151568632
  
    --- Diff: extensions/libarchive/UnfocusArchiveEntry.cpp ---
    @@ -67,55 +66,41 @@ void 
UnfocusArchiveEntry::onTrigger(core::ProcessContext *context, core::Process
       }
     
       fileutils::FileManager file_man;
    -
    -  // Get lens stack from attribute
       ArchiveMetadata lensArchiveMetadata;
     
    -  Json::Value lensStack;
    -  Json::Reader reader;
    -
    -  std::string existingLensStack;
    -
    -  if (flowFile->getAttribute("lens.archive.stack", existingLensStack)) {
    -    logger_->log_info("UnfocusArchiveEntry loading existing lens context");
    -
    -    // TODO(calebj) handle any exceptions that might arise from working 
with JSON data
    -    if (!reader.parse(existingLensStack, lensStack)) {
    -      logger_->log_error("UnfocusArchiveEntry JSON parse error: %s", 
reader.getFormattedErrorMessages());
    -      context->yield();
    -      return;
    +  // Get lens stack from attribute
    +  {
    +    ArchiveStack archiveStack;
    +    {
    +      std::string existingLensStack;
    +    
    +      if (flowFile->getAttribute("lens.archive.stack", existingLensStack)) 
{
    +        logger_->log_info("FocusArchiveEntry loading existing lens 
context");
    +
    +        try {
    +          archiveStack.loadJsonString(existingLensStack);
    --- End diff --
    
    Should we not give the option to transfer this to failure? 


> Consolidate JSON API use to RapidJSON
> -------------------------------------
>
>                 Key: MINIFICPP-114
>                 URL: https://issues.apache.org/jira/browse/MINIFICPP-114
>             Project: NiFi MiNiFi C++
>          Issue Type: Improvement
>            Reporter: John Reynolds
>            Assignee: John Reynolds
>
> MiNiFi was updated with new dependencies to jsoncpp: 
> SiteToSiteProvenanceReportingTask
> Performance observations indicate significant improvements with RapidJSON vs. 
> jsoncpp.  Convert all use of jsoncpp to RapidJSON where applicable.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to