Problem/Motivation
Trying to create a feed to import JSON-formatted calendar event info. Attempts to import result in an Ajax error in the UI. Logs indicate a PHP error in JsonPathParser.php:
TypeError: Drupal\feeds_ex\Feeds\Parser\JsonPathParser::search(): Argument #1 ($data) must be of type array, int given, called in /Applications/MAMP/htdocs/events/web/modules/contrib/feeds_ex/src/Feeds/Parser/JsonPathParser.php on line 53 in Drupal\feeds_ex\Feeds\Parser\JsonPathParser->search() (line 114 of /Applications/MAMP/htdocs/events/web/modules/contrib/feeds_ex/src/Feeds/Parser/JsonPathParser.php).
Simple, single node JSON is the following:
{"event":{"id":46677089246185,"title":"PolishFest 2024","url":null,"updated_at":"2024-06-11T15:54:30-04:00","created_at":"2024-06-11T15:42:29-04:00","facebook_id":null,"first_date":"2024-11-10","last_date":"2024-11-10","hashtag":null,"urlname":"polishfest-2024","user_id":43888401226071,"directions":null,"allows_reviews":true,"allows_attendance":true,"location":"","room_number":null,"location_name":"Cathedral Commons Room","status":"live","experience":"inperson","stream_url":null,"stream_info":null,"stream_embed_code":null,"created_by":43888401226071,"updated_by":43888401226071,"conference_event_id":null,"kind":"standalone","city_id":null,"neighborhood_id":null,"school_id":225,"campus_id":null,"recurring":false,"free":false,"private":false,"verified":true,"rejected":false,"sponsored":false,"venue_id":514395,"ticket_url":null,"ticket_cost":null,"has_register":true,"keywords":[],"tags":[],"description_text":"The 42nd Annual Polishfest is designed to give everyone an opportunity to experience the living Polish, Lithuanian, and Carpatho-Rusyn cultures\n\nThe 42nd Annual Polishfest is designed to give the festival guests, families, and students an opportunity to experience the living cultures of the Polish, Lithuanian and Carpatho-Rusyn Peoples that throughout history were joined, separated and independently are connected. A living legacy presented to teach, to experience, to taste, to try and to have fun.\n\nThis family-oriented event is FREE to everyone and will include many activities such as Polish name writing; Lithuanian angel papercutting demonstration; pierogi / pirohy cooking demonstrations and samples; and Carpatho-Rusyn spinning and lace making; and a pierogi toss.\n\nEvery display, demonstration, and activity will offer an explanation of the cultural history of the tradition.\n\nEntertainment will include Polish folk songs with a violinist; a Lithuanian choir with Bocjai folk songs; Polish Karazula folk songs and folk dancing by the โLajkonikiโ Ensemble; Polka dancing; and contemporary Polish music.\n\nIn-Person event","photo_id":46677136863554,"detail_views":15,"address":"Fifth Ave at Bigelow, Pittsburgh, PA, 15260","description":"<p>The 42nd Annual Polishfest is designed to give everyone an opportunity to experience the living Polish, Lithuanian, and Carpatho-Rusyn cultures</p>\n\n<p>The 42nd Annual Polishfest is designed to give the festival guests, families, and students an opportunity to experience the living cultures of the Polish, Lithuanian and Carpatho-Rusyn Peoples that throughout history were joined, separated and independently are connected. A living legacy presented to teach, to experience, to taste, to try and to have fun.</p>\n\n<p>This family-oriented event is FREE to everyone and will include many activities such as Polish name writing; Lithuanian angel papercutting demonstration; pierogi / pirohy cooking demonstrations and samples; and Carpatho-Rusyn spinning and lace making; and a pierogi toss.</p>\n\n<p>Every display, demonstration, and activity will offer an explanation of the cultural history of the tradition.</p>\n\n<p>Entertainment will include Polish folk songs with a violinist; a Lithuanian choir with Bocjai folk songs; Polish Karazula folk songs and folk dancing by the “Lajkoniki” Ensemble; Polka dancing; and contemporary Polish music.</p>\n\n<p>In-Person event</p>\n","featured":false,"geo":{"latitude":"40.444422","longitude":"-79.95481","street":null,"city":"Pittsburgh","state":"PA","country":"US","zip":"15213"},"filters":{"event_topic":[{"name":"Arts & Culture","id":117195}],"event_types":[{"name":"Festivals","id":132396}]},"custom_fields":{},"localist_url":"https://calendar.pitt.edu/event/polishfest-2024","localist_ics_url":"https://calendar.pitt.edu/event/polishfest-2024.ics","photo_url":"https://localist-images.azureedge.net/photos/46677136863554/huge/fb2fb7c659e46352c080020f6d467a6c88f9c781.jpg","venue_url":"https://calendar.pitt.edu/cathedral_commons_room","departments":[{"id":23875,"name":"Nationality Rooms and Intercultural Exchange Programs"}],"event_instances":[{"event_instance":{"id":46677089247210,"event_id":46677089246185,"start":"2024-11-10T09:00:00-05:00","end":"2024-11-10T16:00:00-05:00","ranking":0.16,"all_day":false,"num_attending":0}}]}}
In my parser mappings, I have $.event.* as the context and id, title, description_text, and departments.name as sources with appropriate target fields. id is set as the unique target.
The PHP error trace in the Drupal logs seems to show that the JsonPathParser is properly identifying the value in id, but I can't figure out the array error.
PHP version is 8.2.20. Drupal is 10.3.1.
Any help is greatly appreciated.