Skip to content

JsonReaderException when encrypting/decrypting arrays #9

@jaaufauvre

Description

@jaaufauvre

Configuration:

var config = JweConfigBuilder.AJweEncryptionConfig()
  //...
  .WithEncryptionPath("$", "$")
  .Build();

Input:

[
	{},
	{}
]

Expected output:

{
  "encryptedData": "ew0KICAia2lkIjogIjc2M...nrs60sQQQdvYxLPwq9g"
}

Actual output:

Mastercard.Developer.ClientEncryption.Core.Encryption.EncryptionException: 
Payload encryption failed! ---> Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray. Path '', line 1, position 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions