c# - Serialize an instance of a Fragment -


so i'm using newtonsoft json serializer in visual studio 2015 programming android xamarin..i want serialize fragment store in sql database. fragment inheriting android.support.v4.app.fragment , @ point i'm trying serialize, object has been created , layout inflated well. i'm relatively new developing android , c# , .net, making major blunders elsewhere.

the class bit big post here, holds lot of other objects such buttons, imageviews , other data types. fields private i've tried making public properties them. i've tried , without [serializable] although don't think has json.

so event triggers tries run:

var test = jsonconvert.serializeobject(mmemoriesfragment); console.writeline("length: " + test.length); console.writeline("data: " + test); 

and each time value returned 2, "{}"

the json serializer working fine mock classes have properties, returns no values when try serialize fragment. there specific trick this?


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -