SG++-Doxygen-Documentation
python.uq.jsonLib Namespace Reference

Functions

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

Function Documentation

◆ parseAttribute()

def 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(), and python.uq.jsonLib.reprVal().

◆ parseKeyAsTuple()

def 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()

def python.uq.jsonLib.reprBool (   attrValue)

◆ reprDict()

def python.uq.jsonLib.reprDict (   attrValue)

◆ reprFloat()

def python.uq.jsonLib.reprFloat (   attrValue)

◆ reprInt()

def python.uq.jsonLib.reprInt (   attrValue)

◆ reprKey()

def python.uq.jsonLib.reprKey (   attrValue)

◆ reprList()

def python.uq.jsonLib.reprList (   attrValue)

◆ reprString()

def python.uq.jsonLib.reprString (   attrValue)

◆ reprTuple()

def python.uq.jsonLib.reprTuple (   attrValue)

◆ reprVal()

def 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(), python.uq.jsonLib.reprTuple(), and create_dataset.type.

Referenced by python.uq.jsonLib.parseAttribute(), python.uq.jsonLib.reprDict(), python.uq.jsonLib.reprList(), and python.uq.jsonLib.reprTuple().

◆ stringToList()

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

◆ stringToListOfLists()

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

◆ stringToTupleOfFloats()

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

References sgpp::combigrid.split().

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