SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
python.uq.jsonLib Namespace Reference

Functions

 parseAttribute (attrValue, attrName)
 
 parseKeyAsTuple (d)
 
 reprBool (attrValue)
 
 reprDict (attrValue)
 
 reprFloat (attrValue)
 
 reprInt (attrValue)
 
 reprKey (attrValue)
 
 reprList (attrValue)
 
 reprString (attrValue)
 
 reprTuple (attrValue)
 
 reprVal (attrValue)
 
 stringToList (s, f=float)
 
 stringToListOfLists (s, f=float)
 
 stringToTupleOfFloats (s)
 

Function Documentation

◆ parseAttribute()

python.uq.jsonLib.parseAttribute (   attrValue,
  attrName 
)
Parses a single class attribute to the correspondent string
representation in json.
@param attrValue: value of the attribute
@param attrName: name of the attribute
@return: json string equivalence

References python.uq.jsonLib.reprString().

◆ parseKeyAsTuple()

python.uq.jsonLib.parseKeyAsTuple (   d)
Converts the string representation of a dict to an actual dict
@param d: dictionary

References python.uq.jsonLib.stringToTupleOfFloats().

◆ reprBool()

python.uq.jsonLib.reprBool (   attrValue)

◆ reprDict()

python.uq.jsonLib.reprDict (   attrValue)

◆ reprFloat()

python.uq.jsonLib.reprFloat (   attrValue)

◆ reprInt()

python.uq.jsonLib.reprInt (   attrValue)

◆ reprKey()

python.uq.jsonLib.reprKey (   attrValue)

◆ reprList()

python.uq.jsonLib.reprList (   attrValue)

◆ reprString()

python.uq.jsonLib.reprString (   attrValue)

◆ reprTuple()

python.uq.jsonLib.reprTuple (   attrValue)

◆ reprVal()

python.uq.jsonLib.reprVal (   attrValue)
Computes a string representation of attrValue that is
valid json. Supported are:
1) boolean
2) integer
3) dictionary
4) float
5) list, np.ndarray
6) tuple
7) string
8) DataVector
9) objects with ".toJson" method
10) objects with ".serialize" method
@param attrValue: arbitrary object

References python.uq.jsonLib.reprBool(), python.uq.jsonLib.reprDict(), python.uq.jsonLib.reprFloat(), python.uq.jsonLib.reprInt(), python.uq.jsonLib.reprList(), python.uq.jsonLib.reprString(), and python.uq.jsonLib.reprTuple().

◆ stringToList()

python.uq.jsonLib.stringToList (   s,
  f = float 
)

◆ stringToListOfLists()

python.uq.jsonLib.stringToListOfLists (   s,
  f = float 
)

◆ stringToTupleOfFloats()

python.uq.jsonLib.stringToTupleOfFloats (   s)
Converts s to a tuple
@param s: string
@return: tuple represented by s

Referenced by python.uq.jsonLib.parseKeyAsTuple().