Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Assigning objects to the context does not convert them to JsonObjects #1560

Closed
matheusribeirozup opened this issue May 13, 2021 · 0 comments · Fixed by #1566
Closed

Assigning objects to the context does not convert them to JsonObjects #1560

matheusribeirozup opened this issue May 13, 2021 · 0 comments · Fixed by #1566
Assignees
Labels
android This issue directly affects structure and logic of Android project bug Something isn't working

Comments

@matheusribeirozup
Copy link
Contributor

Description

When assigning an object's instance to the context, the right thing would be to treat it as a JsonObject for navigation in its properties to be possible, but the object itself is saved.

Steps To Reproduce

  1. Create any class with at least one attribute, like this:
data class User(
    val id: String,
)
  1. Create an instance of this class:
val user = User(id = "identifier")
  1. Save this property in context:
GlobalContext.set(value = user, path = "user")
  1. Try to access the id property:
Text(text = expressionOf("User ID: @{global.user.id}"))
  1. The id does not appear.

Expected Results

The id is expected to be displayed.

@matheusribeirozup matheusribeirozup added bug Something isn't working android This issue directly affects structure and logic of Android project labels May 13, 2021
@matheusribeirozup matheusribeirozup self-assigned this May 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
android This issue directly affects structure and logic of Android project bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant