Oracle 12c PL / JSON切掉5000个字符的字符串

时间:2018-09-18 16:49:26

标签: json oracle plsql oracle12c pljson

我遇到一个问题,PL/JSON截取了恰好5000个字符的字符串值。

示例数据: if(status === "OK"){ var oEntry = {}; oEntry.Mblnr = that.getView().byId("idMaterial").getText(); oEntry.Mjahr = that.getView().byId("idYear").getText(); oEntry.Rsnum = that.getView().byId("idReservation").getText(); var oModel = that.getView().getModel(); oModel.create("/SaveDataSet", oEntry, null, { success : function() { MessageToast.show("Your data has been saved successfully"); },error: function() { MessageToast.error("Material Exist In table");

将JSON字符串转换为对象后,运行此命令...

{"n1":"v1","n2":"v2","n3":"10017325060844,10017325060845,... this goes on for a total of 32,429 characters ...10017325060846,10017325060847"}

它仅输出前5000个字符。因此,我做了一些挖掘工作,see line 26 of this code。在第31行的正下方,dbms_output.put_line(json_obj.get('n3').get_string);被设置并包含所有32,429个字符。现在让我们继续extended_str成员函数。有两个。我验证了它是第一个被调用的参数,它带有get_string()max_byte_size参数。这些参数都为空。那么,为什么我的文字被切成5000个字符?我需要它来处理max_char_sizevarchar2(32767)的数据字符串。谢谢!

版本:Oracle Database 12c企业版12.1.0.2.0版-64位生产

更新:我发现该文本的截断来自line 35clobs。我之前忽略了此代码,因为我看到了注释并且知道我的字符串不是null。那么为什么需要读取此内容?这是错误吗?

1 个答案:

答案 0 :(得分:1)

作为pljson项目的维护者,我已经在github(https://github.com/pljson/pljson/issues/154)上回答了您的问题。对于任何其他问题,请随时在github上的同一问题线程中提问。