It doesn't make a huge difference, as I noted when raising this.  Personally, I would put the assert in the default clause (because this is where the switch identifies the situation that shouldn't be arising) and the return outside (because then the function overtly ends in a return statement, so it's immediately obvious to a reader (or a compiler with poor flow-path checking) that every path through the function does reach a return).  I'd also spell the assert(!"Unrecognised JSON primitive type"); so that the error message produced on hitting it gives at least some clue to what was wrong.  (A string literal is always a non-NULL pointer value, so !"it" is necessarily false.)  However, just adding the return where you did is entirely fine; all other cases of the switch do in fact return, after all.