webmcp

changeset 178:1a85110cdbe2

Throw error in mondelefant-atom-connector when encountering illegal JSON document
author jbe
date Fri Aug 01 23:08:42 2014 +0200 (2014-08-01)
parents c16292cbcc1e
children 461e5353ffb1
files libraries/mondelefant/mondelefant_atom_connector.lua
line diff
     1.1 --- a/libraries/mondelefant/mondelefant_atom_connector.lua	Fri Aug 01 22:20:53 2014 +0200
     1.2 +++ b/libraries/mondelefant/mondelefant_atom_connector.lua	Fri Aug 01 23:08:42 2014 +0200
     1.3 @@ -130,8 +130,11 @@
     1.4  output_converters.time = time_loader_func
     1.5  output_converters.timetz = time_loader_func
     1.6  
     1.7 -output_converters.json = json.import
     1.8 -output_converters.jsonb = json.import
     1.9 +local json_loader_func = function(str)
    1.10 +  return assert(json.import(str))
    1.11 +end
    1.12 +output_converters.json = json_loader_func
    1.13 +output_converters.jsonb = json_loader_func
    1.14  
    1.15  mondelefant.postgresql_connection_prototype.type_mappings = {
    1.16    int8 = atom.integer,

Impressum / About Us