#3066 method call json default option set up to str
Merged 2 years ago by tkopecek. Opened 3 years ago by jcupova.
jcupova/koji issue-3065  into  master

No commits found

I would be rather more explicit, so we can control the output for other "weird" types. So, instead of instead of using str directly I would like to see helper class (cls parameter dealing explicitely with datetime and raising error on other unhandled types (if datetime/else JSONEncoder.default(self, o))

rebased onto 5d6354e

3 years ago

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

3 years ago

@jcupova I've reviewed once more the original issue and it looks to me that we're firefighting something which should have been solved directly on server. Every datetime value coming back from API should be converted to string (kojixmlrpc.py:Marshaller). So something is rotten underneath. I've seen it only for task.request but maybe it is more widespread.

Ok, it is a problem exactly for "request" which is stored as xmlrpc with datetime component. So, it is probably ok to convert it on fly here.

Metadata Update from @mfilip:
- Pull-request tagged with: testing-done

2 years ago

Commit fdccd38 fixes this pull-request

Pull-Request has been merged by tkopecek

2 years ago
Metadata