Wish B4x reflection

Discussion in 'iOS Bugs & Wishlist' started by Brian Robinson, Mar 25, 2015.

  1. Brian Robinson

    Brian Robinson Active Member Licensed User

    Reflection type library for B4A and B4i.

    It would be nice to be able to serialize and de-serialize whole classes as JSON or similar without having to write all the code to export and import all the properties to and from JSON. Instead using the reflection library to get property names and values would be awesome...

    Please consider
    Brian
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    If your main purpose is serialization then you can use RandomAccessFile.WriteB4XObject / ReadB4XObject.
     
  3. Brian Robinson

    Brian Robinson Active Member Licensed User

    Hi Erel,

    Is it possible to write out a User Defined Class? It only mentioned User Defined Types in the doco.

    It would be nice to be able to write into a memory stream as well. Possible?

    Cheers
    Brian
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    No. Only types. You can however create a sub that converts a specific class to a type and vice versa.
     
  5. Brian Robinson

    Brian Robinson Active Member Licensed User

    Yeah, I thought of that... I guess I am just lazy....hehe

    Cheers
    Brian
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice