Handle text and json raw