Skip to content

ShareChat/Widget-JSON-Validator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Widget-JSON-Validator

A JS tool to validate JSON for Widget.

Checks supported

Usage:

  • index.js file is the start point
  • There are two main methods.
    • validateFeedItem : Validates Widgets for feed. It expects complete Post Model object for feed.
    • validateExploreItem : Validates Widgets for Explore. It expects complete object for explore screen.

Type Checkings

  • Header Type
  • Slot Type
  • Item Type
  • Other Predefined types...

Item Reference Validation

If any item is referred with incorrect key. Or Value is not present but still accessed.

Data Reference Validation

If any data is referred with incorrect key. Or Value is not present but still accessed.

Action Reference Validation

If any click/view action is referred with incorrect key. Or Value is not present but still accessed.

Event Reference Validation

If any event is referred with incorrect key. Or Value is not present but still accessed.

Color Reference Validation

If any color is referred with incorrect key. Or Value is not present but still accessed.

Style Reference Validation

If any style is referred with incorrect key. Or Value is not present but still accessed.

Object Keys Validation

If any object has incorrect set of keys.

Placeholder Replacement Validation

If placeholder is not satisfied with value.

Nested Reference Validation

For e.g. : view --> action --> event --> data

  • view is not able to locate action
  • action is not able to locate event
  • event is not able to locate data for its placeholders (if any)
  • action is not able to locate data for its placeholders (if any)

Sample error Screenshot 2022-09-30 at 6 10 06 PM

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%