{"id":23061443,"url":"https://github.com/syncfusionexamples/json-listview-xamarin","last_synced_at":"2026-05-07T01:04:31.424Z","repository":{"id":38104079,"uuid":"245163590","full_name":"SyncfusionExamples/JSON-listview-xamarin","owner":"SyncfusionExamples","description":"This repository contains the sample about how to bind JSON data to Xamarin.Forms ListView (SfListView) ?","archived":false,"fork":false,"pushed_at":"2024-05-28T13:18:12.000Z","size":531,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-21T17:05:52.844Z","etag":null,"topics":["json","json-data","listview","xamarin","xamarin-forms"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SyncfusionExamples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-05T12:57:37.000Z","updated_at":"2024-05-28T13:18:17.000Z","dependencies_parsed_at":"2024-05-28T13:19:38.261Z","dependency_job_id":"243361dc-2a20-44f7-9c7f-643aa3c1c14f","html_url":"https://github.com/SyncfusionExamples/JSON-listview-xamarin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SyncfusionExamples/JSON-listview-xamarin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FJSON-listview-xamarin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FJSON-listview-xamarin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FJSON-listview-xamarin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FJSON-listview-xamarin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SyncfusionExamples","download_url":"https://codeload.github.com/SyncfusionExamples/JSON-listview-xamarin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FJSON-listview-xamarin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275185298,"owners_count":25419917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","json-data","listview","xamarin","xamarin-forms"],"created_at":"2024-12-16T03:17:30.723Z","updated_at":"2026-05-07T01:04:31.393Z","avatar_url":"https://github.com/SyncfusionExamples.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to bind JSON data to xamarin.Forms ListView (SfListView) ?\nYou can bind the data from JSON (JavaScript Object Notation) file in Xamarin.Forms SfListView using the ItemsSource property.\n\n**XAML**\n\nThe JSON data can be bound to the SfListView ItemsSource property.\n``` xml\n\u003csyncfusion:SfListView x:Name=\"listView\" ItemSize=\"70\" \n                        ItemSpacing=\"5\" Grid.Row=\"1\"\n                        ItemsSource=\"{Binding ItemsSource}\"\u003e\n    \u003csyncfusion:SfListView.ItemTemplate\u003e\n                \u003cDataTemplate\u003e\n                    \u003cViewCell\u003e\n                        \u003cGrid\u003e\n                            \u003cGrid.ColumnDefinitions\u003e\n                                \u003cColumnDefinition Width=\"*\"/\u003e\n                                \u003cColumnDefinition Width=\"*\"/\u003e\n                            \u003c/Grid.ColumnDefinitions\u003e\n                            \u003cGrid.RowDefinitions\u003e\n                                \u003cRowDefinition Height=\"Auto\"/\u003e\n                            \u003c/Grid.RowDefinitions\u003e\n                            \u003cLabel Grid.Column=\"0\" Text=\"{Binding Converter={StaticResource converter}, ConverterParameter=Value1}\" HorizontalOptions=\"Start\" TextColor=\"Black\" FontSize=\"16\" FontAttributes=\"Bold\"/\u003e\n                            \u003cLabel Grid.Column=\"1\" Text=\"{Binding Converter={StaticResource converter}, ConverterParameter=Value2}\" HorizontalOptions=\"Start\" TextColor=\"Black\" FontSize=\"16\" FontAttributes=\"Bold\"/\u003e\n                        \u003c/Grid\u003e\n                    \u003c/ViewCell\u003e\n                \u003c/DataTemplate\u003e\n            \u003c/syncfusion:SfListView.ItemTemplate\u003e\n\u003c/syncfusion:SfListView\u003e\n```\n**C#**\n\nAccessed the JSON file from local folder and StreamReader reads the data to return as a dynamic object.\n``` c#\npublic ViewModel()\n{\n    var assembly = typeof(MainPage).GetTypeInfo().Assembly;\n    Stream stream = assembly.GetManifestResourceStream( \n                    \"ListViewXamarin.Data.Data.json\");\n    using (StreamReader sr = new StreamReader(stream))\n    {\n        var jsonText = sr.ReadToEnd();\n        ItemsSource = JsonConvert.DeserializeObject\u003cdynamic\u003e(jsonText);\n    }\n}\n```\n**C#**\n\nDynamic object value converted by ExpandoObject to show the values.\n``` c#\n    public class DynamicToPathValueConverter : IValueConverter\n    {\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\n        {\n          if (value == null)\n            return value;\n          ExpandoObject busniessObject = JsonConvert.DeserializeObject\u003cExpandoObject\u003e(value.ToString());\n          var jsonList = busniessObject.ToList();\n          if (parameter.Equals(\"Value1\"))       \n            return jsonList[0].Value;\n          if (parameter.Equals(\"Value2\"))\n            return jsonList[1].Value;\n      return value;\n   }\n   public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\n   {\n      throw new NotImplementedException();\n   }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncfusionexamples%2Fjson-listview-xamarin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyncfusionexamples%2Fjson-listview-xamarin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncfusionexamples%2Fjson-listview-xamarin/lists"}