Skip to main content
Question

Cannot deserialize the current JSON array

  • September 24, 2024
  • 4 replies
  • 156 views

We have a BigCommerce store we are using with Acumatica and syncing using Acumatica’s BigCommerce Connector.  Within BigCommerce, we are using the B2B Edition module.

We are seeing errors in the connector that are preventing the successful syncing of both orders and customer information.  The errors start with “Cannot deserialize the current JSON array”.  I don’t have a clue what this means or how to even begin to troubleshoot or fix it.  Hoping someone can help.

Here are the full error messages:

Sales Order:

Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'BBTB.API.Helper.B3Order' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.Path 'data', line 1, position 20.

 

Customer:

Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[BBTB.API.Helper.B3Customer]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) 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 'data.errMsg', line 1, position 29.

 

We are running:

Acumatica: 2023 R1  Build 23.113.0042 

BC Connector: 3.2.6

 

Any help would be greatly appreciated!

4 replies

hdussa
Jr Varsity I
Forum|alt.badge.img
  • Jr Varsity I
  • 99 replies
  • September 24, 2024

Hello @GenData ,

 

Looks like the method is expecting a different input or the method does not accept the array. I would try the same JSON with a REST Client tool and review it in detail.

 

Hope this helps!


  • Author
  • Freshman I
  • 1 reply
  • September 24, 2024

Thanks Harish!...but that is way out of my league.  Why is this even throwing this error in the first place?  This is all supposed to be designed to work together.  I don’t know what to do to even diagnose or solve an error of this level of technicality/complexity, and right now we are stuck until this gets solved.


hdussa
Jr Varsity I
Forum|alt.badge.img
  • Jr Varsity I
  • 99 replies
  • September 24, 2024

Agreed! I guess one or more dependencies are missing. Please open a support case with the TRACE if not done yet.

I hope you will nail the issue soon.


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2751 replies
  • November 13, 2024

Hi @GenData were you able to find a solution? Thank you!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings