If you want to get published, the latter style is not acceptable. Follow the standard convention.
Just Google for "Formatting Dialogue", look for sources related to written fiction (as opposed to script writing or academic or business or legal writing). When I did that I found the following most popular hits:
From personal experience I have read the same advice on agent websites and publisher websites and in numerous fiction writing books for many years.
The fact that the most popular sites agree on this means this is what people expect, it is the standard convention. People includes Agents and Publisher and CopyEditors; if you do not follow this convention, they will reject your fiction without a second thought, as too amateurish and distracting to continue reading.
In the modern business of publishing, an agent's role is a filter reader. They read, for free, a river of query letters, synopses and opening pages to determine whether to bring a new work to a publisher or not. Because it is free to send them your material (no longer even costs a postage stamp and paper), they have to filter through a lot of amateurish writing. Because actual representation, the selling of books to publishers and negotiating contracts and working with artists takes real working hours, they have to limit the number of writers they can actually represent. Plus the publishers expect them to do a good job of filtering. The publisher may still reject most of what an agent brings them as not right for them at the time, but they still expect it to be a readable and coherent story. If an agent starts bringing the publisher incompetent junk, the publisher will stop taking their meetings. They also have real work to do, in producing and marketing books.
A copy editor also expects the conventional formatting. If
"blah blah." John said.
were to be encountered somewhere in the middle of a book by a publisher's copyeditor, unless the context made it clear it was on purpose, the copyeditor would treat it like a misspelling and change it, without consulting the author.
If you adopt this wrong style throughout, you will alienate Agents, Publishers, and Readers. Because it is dialogue, the error is likely to be pervasive, distracting and immersion breaking. Even if you self-publish, that is likely to garner you bad reviews.
If you want to sell what you write, use the standard conventions, portrayed in the links above. Otherwise you will alienate Agents, Publishers and ultimately (even if you self-publish) Readers that will rank your work.
The only one I think some people find confusing is when a character, telling a story or long explanation or making a speech, has several paragraphs to say. In that case, the beginning of each paragraph is indented and begins with a quote-mark, but only the last paragraph spoken gets a closing quote-mark.
"This is how it went. The kids were in the park, flinging those flying rings, getting plenty of exercise. Like any normal Sunday, right? We were there a few hours, I guess, I thought we should probably get home, get dinner started, whatever.
"I called the kids in, that's when I noticed the spots. They all had these blue spots, all over 'em. I asked 'em what these spots were, and they didn't know what I was talking about! They couldn't see 'em. Not on themselves, not on each other. Even Alice, and she's too young to lie that good, she grins when she's lying, and she wasn't grinning.
"So I am at a loss, Gary. I'm afraid to touch 'em, in case it's some kind of infection. And I could see the spots, but if I got infected with blue spots, I figure I'd be like them, and I couldn't see the spots anymore, on me or on the kids.
"So you tell me. What was I supposed to do?"