Skip to content

ShabariRepo/DnaTextToJsonParseApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

DnaTextToJsonParseApi

test to text whether Text passed in with URI using REST call can be parsed to JSON OBJECT

Parse Text to JSON:

  1. text will be passed in with the URI parameters with the '?text=' param (/Controller/Api)
  2. The controller will then use the interface or method from ParseTextToJson model (ParseText() method)(/Dto)
  3. Operators will be implicitly converted to JSON objects using the DnaLog and Operator models
    • 3a. There are 4 models and the main model being LogDnaDto (/Dto)
    • 3b. Any chages made will be only to the ParseTextToJson class unless model needs to be expanded
  4. DTO objects are used to not interfere with the original models under /models
  5. If ;and; not specified, then will default to OR
    • 5a. <400;>500; will default to <400;or;>500;
  6. Not supported yet :( :
    • Multiple String inputs within ( )
    • ! operator will be parsed as its own object
    • Int conversion of the len(..) value
      • to fix this if it needs to be an int, may need to extract into a partial class or struct
      • if not the int will always show even if not set in the JSON object
    • FIX: <= >= comparison operators fixed now will work :)

Example URI: "http://localhost:11974/api/dna?text="test data";or;>len(9);"

Sample images: image

image

image

image

image

About

test to text whether Text passed in with URI using REST call can be parsed to JSON OBJECT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors