Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

218
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda