PL/JSON is a generic JSON object written in PL/SQL. Using PL/SQL object syntax, users instantiate a JSON objects and then add members, arrays and additional JSON objects. This object type can store JSON data, in Oracle, persistently.
I'm using the script below in order to fetch JSON file from MongoDB, parse it and then insert it into Oracle table.
The script works fine in a sense that it inserts all values correctly into Oracle table. That includes the value Photo which is an image of base64 formate and it is much larger than 32KB.
The column Photo in the table Appery_Photos is of the type CLOB while column DecodedPhoto is of the type BLOB.
The result was the same for all of them. That is, the resultant BLOB object cannot be openned as an image in any of images editors (I'm using Oracle SQL Developer to download it).
I checked CLOB, and I could not find any newlines \n, nor could I find any spaces (only + signs found). Furthermore, I inserted CLOB value into the base64-image-converter and it displays the image correctly. In addition, I tried to encode the resultant BLOB in base64 back in order to further validate (using the opposite functions provided in the links above), the resultant base64 is not the same at all.
it was highly recommended for me. but finally you can help us.
Please post more projects as such type of work.
like (java classes for getting client ip , os name, login name file transfer from client to client , server to client and also client to server)
Thanks Alot
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm using the script below in order to fetch JSON file from MongoDB, parse it and then insert it into Oracle table.
The column Photo in the table Appery_Photos is of the type CLOB while column DecodedPhoto is of the type BLOB.
The problem lies in the line
blobOriginal := base64decode1(Photo);
which I used to decode the CLOB into BLOB. The function base64decode1 has been replaced with several functions (i.e. decode_base64 , base64DecodeClobAsBlob_plsql, base64decode , from_base64 & finally JSON_EXT.DECODE).The result was the same for all of them. That is, the resultant BLOB object cannot be openned as an image in any of images editors (I'm using Oracle SQL Developer to download it).
I checked CLOB, and I could not find any newlines \n, nor could I find any spaces (only + signs found). Furthermore, I inserted CLOB value into the base64-image-converter and it displays the image correctly. In addition, I tried to encode the resultant BLOB in base64 back in order to further validate (using the opposite functions provided in the links above), the resultant base64 is not the same at all.
Any advice would be deeply appreciated.
Last edit: Hawk 2014-11-27
it was highly recommended for me. but finally you can help us.
Please post more projects as such type of work.
like (java classes for getting client ip , os name, login name file transfer from client to client , server to client and also client to server)
Thanks Alot
Regards