OmkarPathak / pyresparser

A simple resume parser used for extracting information from resumes
GNU General Public License v3.0
808 stars 411 forks source link

json decode issue when done in php command line applications #12

Closed raghuveer closed 4 years ago

raghuveer commented 4 years ago

recently, when attempting to parse the response, I always used to get NULL, when checked,

we have text like:

"Extracting Data from "

then, after removing all extra whitespace, the json is still not being decoded in php.

a) when checked, I see some commas, missing in some parts of the json object (Example: Designation)

b) I did notice None, without quotes for some key value pairs (it happened with Degree & College Name w.r.t. a particular resume)

c) double quotes served better than single quotes, when tried validating the Modified Version of the Received JSON using https://jsonlint.com/

All the above errors happened when tried using pyresparser response in php (in php based Commandline applications/Cron Jobs),

do appreciate inputs on this,

thank you

pyresparser-extracted-text.txt

OmkarPathak commented 4 years ago

@raghuveer thanks for all the above inputs. I will surely work on these. I typically made this library for Python use so I just returned a dictionary instead of json, but as per your use case, I think returning JSON response would be more appropriate

raghuveer commented 4 years ago

Thanks for the info :)

Awaiting to see the update soon

OmkarPathak commented 4 years ago

@raghuveer new version 1.0.6 is released. Check this out https://www.omkarpathak.in/pyresparser/cli/#specifying_export_format this solves this issue.