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

436
Visualizações
Cannot deserialize the current JSON object (e.g. {\"name\":\"value\"})

I am getting an error in postman like below

Cannot deserialize the current JSON object (e.g. {\"name\":\"value\"}) into type 'System.Char' because the type requires a JSON primitive value (e.g. string, number, boolean, null) to deserialize correctly.
To fix this error either change the JSON to a JSON primitive value (e.g. string, number, boolean, null) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'cardNumber', line 2, position 15."

I am passing a string value:

{
    "cardNumber": "{{strCardNumber}}"
}

The card number is a collection variable which is set in previous request in same collection. I also checked whether the cardnumber is string in previous request with a test.

pm.expect(pm.collectionVariables.get("strCardNumber")).to.be.a('string');

This test passed, so the cardnumber is a string but I am not sure why I am getting this error. Can someone please help me in this?

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