Skip to content

SwiftUIlibrary/JsonUI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JsonUI

An open-source platform that helps you render & interact the UI from Json quickly. For an example, we have a QR code look like this:

Then it would be decoded to JsonUI format:

{
  "version": "1.0.0",
  "requestEndpoint": "https://staging.zentapi.com?formId=123456",
  "requestMethod": "POST",
  "requestHeader": {
    "content-type": "Application/JSON"
  },
  "requestBody": {
    "userId": "$userId",
    "answer": "$selectedValue"
  },
  "formTitle": "The title form",
  "formBody": [
    {
      "label": {
      "string": "How do you think about us?",
      "style": "title"
      }
    },
    {
      "label": {
        "string": "Please choose an interaction bellow to tell about us",
        "style": "body"
      }
    },
    {
      "image": {
        "url": "https://staging.zentapi.com/images?formId=123456"
      }
    },
    {
      "spacing": {
        "style": "normal"
      }
    },
    {
      "answerPicker": {
        "style": "singleChoice",
        "items": ["Very good", "Not really useful"],
        "itemCorrect": [0],
        "titleCorrect": "Thanks for your feedback!",
        "titleWrong": "Opps! So sorry to hear that!",
        "doneButtonTitle": "Done"
      }
    }
  ]
}

By using JsonUI client apps (iOS & Android), after scanning the QR code above, we get the UI look like this:

About

Render UI from Json & interacting

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%