idp_server.IO

This module contains code to create and analyze messages to/from the web client.

idp_server.IO.metaJSON(state)[source]

Format a response to meta request.

Parameters:idp – the response
Returns out:a meta request
idp_server.IO.decode_UTF(json_str: str) → str[source]

Convert all Python unicode to actual unicode characters.

Parameters:json_str – the string to convert
Returns:the converted string
Return type:str
idp_server.IO.json_to_literals(state, jsonstr: str)[source]

Parse a json string and create assignments in a state accordingly. This function can also overwrite assignments that have already been set as a default assignment, effectively overriding the default.

Parameters:
  • state – a State object containing the concepts that appear in the json
  • jsonstr – the user’s assignments in json
Returns:

the assignments

Return type:

idp_solver.Assignments