seriesJSON
variable contains the JSON that identifies a series being viewed. You could use ToJSON
but that should be used only if you know exactly what properties it contains. For example, using ToJSON
on a Group
would be a bad idea as it will generate a huge amount of JSON you don't need, including most likely some sensitive data.FromJson
tag a bit and see what it might look like after it's parsed by the server-side Lava.{}
prefix we had is still there. That is required so the the XAML system knows that the {
which starts the JSON data should not be treated as a XAML extension. Basically it sees the {}
and then knows to just ignore that part and treat the rest as a plain text string.Series
. Then, on a Label inside that Stack Layout we use binding to bind to the name of the series. This is obviously a somewhat pointless example as you could do this more easily. But suppose your JSON also included a Messages
property that contained an array of the messages in the series. You could use a Collection View or something like that to bind to that Messages property for it's content and dynamically build the UI to display all those messages.