Reputation: 11595
Can someone please explain what I am doing wrong?
I receive the following exception message when using a JsonProvider:
System.Exception: Invalid JSON starting at character 0, snippet =
json =
https://facebook.github.io/react-native/movies.json
My code is the following:
open FSharp.Data
type MovieProvider = JsonProvider<"https://facebook.github.io/react-native/movies.json">
let result = MovieProvider.Parse "https://facebook.github.io/react-native/movies.json"
The exception is thrown when executing this line:
let result = MovieProvider.Parse "https://facebook.github.io/react-native/movies.json"
NOTE:
I am referencing the this documentation.
Upvotes: 0
Views: 353
Reputation: 233150
You're trying to parse a URL as JSON. You probably want MovieProvider.Load
.
Upvotes: 2