llama-hub icon indicating copy to clipboard operation
llama-hub copied to clipboard

JSONReader: Encoding fixes UnicodeDecodeError

Open freinold opened this issue 1 year ago • 1 comments

Description

Provides additional encoding parameter in JSONReader, default is UTF-8. Fixes "UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 3445: character maps to " on Windows 10 x64

Type of Change

Please delete options that are not relevant.

  • [x] Bug fix / Smaller change

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [x] I stared at the code and made sure it makes sense

Suggested Checklist:

  • [ ] I have added a library.json file if a new loader/tool was added
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] New and existing unit tests pass locally with my changes
  • [ ] I ran make format; make lint to appease the lint gods

freinold avatar Nov 27 '23 12:11 freinold

Hi @freinold, Thankyou for the contribution.

Could you also please take a look at linting!

anoopshrma avatar Nov 27 '23 14:11 anoopshrma