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

78
Vistas
AWS Model - JSON string inside string type

What I'm trying to do is to have a basic model that takes in a JSON string rather than defined all my variables/elements upfront. My model will take in an "options" element which I want to contain a json string. My model is below.

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "GroceryStoreInputModel",
  "type": "object",
  "properties": {
    "options":{"type":"string"}
  }
}

in my api-gateway, this will work with i just do a basic body like this:

{"options":"this is my options"}

but i get a model not matching error if I replaced the string with a json string.

  {"options":"{\\"name\\":\\"thaison\\",\\"mail\\":\\"test2\\"}"}

I also tried "" escaped but did not work as well, is there a way to do this?

{"options":"{""name"":""thaison"",""mail"":""test2""}"}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

it looks like your payload value for the options node is being interpreted as object instead of string. Can you try the following settings instead to solve the problem?

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "GroceryStoreInputModel",
  "type": "object",
  "properties": {
    "options":{"type":"object"}
  }
}
about 4 years ago · Juan Pablo Isaza Denunciar
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