Possible Problem With List Single (BETA) Endpoint
A customer alerted us to the fact that the deserialization of the new (beta) List Single endpoint throws an error:
Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[System.Object]' 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 'count', line 1, position 9.
I've confirmed the issue and think it arises from the fact that the JSON response isn't a pure collection object which cannot therefore be deserialized to a List:
{
"count": 1000,
"page": 1,
"results": {
"rows": [{
"columns": [{
"name": "Student User ID",
"value": "1574374"
}, {
"name": "Faculty User ID",
"value": "1574461"
}]
}, { ...
FYI, we are using the OpenAPI definitions to generate C#.NET code. Manually changing the return type from List<Object> to Object rectifies the error but the resultant data isn't very useful/manageable.
Could someone in the School dev team please take a look and let me know what you think?
Cheers and thanks,
Steve Cinquegrana | CEO and Principal Developer | Protégé Solutions
Comments
-
I'm the SKYLib customer who reported the problem to @Steven Cinquegrana.
When I access an Advanced List's content through the Try-It page, I get the expected results.
This looks like an error in the meta-data for the endpoint - not with the code itself. The endpoint is useless in my environment until this gets fixed.
1 -
Hi Brian,
Hopefully there'll be a response soon.
The School Schema doesn't include an object definition for the List Single response. There's one for List Lists:
CollectionOfListRead
The CollectionOfListRead entity has the following properties:
Property Type Description
count integer The number of items in the collection
next_link string For paginated responses, the URI for the next page of results
value array of listread ListRead Class(Sorry for the formatting but it doesn't seem possible to insert code any more or even change font or enter multiple spaces.)
The reason you don't have a problem with the Try It utility is that the response isn't deserialized, it's just presented as raw JSON. The issue is in the deserialization from JSON to an object model and the List Single “object model” is a simple array which defaults to a List(Of Object) when deserialized using JSON.NET.
Cheers, Steve
0 -
Sorry for the late reply. I looked into this yesterday and I believe the problem is with the naming of the result object.
We will work on a fix and get it released as soon as we can!
0 -
Good Morning!
I wanted to let everyone here know that we released a fix this morning that appears to have solved the issues you were experiencing. If you still experience some issues please let us know.
3 -
Appears to have fixed the issue. Thanks @Jared Harbour.
Brian, we'll have a SKYLib release addressing this out this afternoon.
Cheers, Steve
0
Categories
- All Categories
- 6 Blackbaud Community Help
- 211 bbcon®
- 1.4K Blackbaud Altru®
- 396 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.5K Blackbaud Financial Edge NXT®
- 650 Blackbaud Grantmaking™
- 568 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 937 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.5K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 248 ResearchPoint™
- 119 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 239 The Tap (Just for Fun)
- 34 Blackbaud Community Challenges
- 31 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Data Health
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 785 Community News
- 2.9K Jobs Board
- 53 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)

