From RxAlamofire's readme, it seems a method json(_:_:) exists in the library.

Typically, you'd rather use map instead of flatMap to transform the returned data to another format. flatMap would be useful if you needed to subscribe to a new observable (for example, doing a second request using part of the result from the first one).