Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

221
Visualizações
Error in sending json data from nodejs to r using r-integration

I'm currently using NodeJS and using r-integration. I'm trying to send this sample JSON

var jsonobj={"month": "january", "totalrevenue": 1000000}

from nodejs to Rstudio by R.callMethod.

In R.file,

library(rjson)
library(plyr)
x = function(data) {
  sample <- rjson::fromJSON(data)
  return (ex)
}

where data is the jsonobj.

The function just returns the JSON data as a complete string as supposed to how it is. Given below is how the output is in node js.

[ '{month:august,totalrevenue:78841814.37}' ]

The code gives me the following error

Error in rjson::fromJSON(data) : not all data was parsed (0 chars were parsed out of a total of 39 chars)

How can I fetch the JSON back from R exactly as it is passed from NodeJS?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda