etr  4.0-pre
Public Member Functions | List of all members
EtrJson.EtrJson Class Reference

Robot Framework Library of JSON keywords provided by etr. More...

Public Member Functions

def decode_json (self, input)
 Decode input as JSON string and return decoded value. More...
 
def encode_json (self, input, pretty=False)
 Encode input string to JSON and return result. More...
 

Detailed Description

Robot Framework Library of JSON keywords provided by etr.

Member Function Documentation

◆ decode_json()

def EtrJson.EtrJson.decode_json (   self,
  input 
)

Decode input as JSON string and return decoded value.

   Decoded dictionaries use the robot type DotDict which support dot-access syntax:

       ${dict} =  Decode Json  {"key": "value"}
# Dot-access syntax

Should Be Equal ${dict.key} value

# Standard dict syntax

Should Be Equal ${dict["key"]} value

◆ encode_json()

def EtrJson.EtrJson.encode_json (   self,
  input,
  pretty = False 
)

Encode input string to JSON and return result.


The documentation for this class was generated from the following file: