Gays and lesbians are getting married in China — but not in the way they might hope.

Same-sex unions are still illegal in China, and members of the Chinese LGBT community face the same intense parental pressure as their straight friends to get hitched and produce grandchildren.

“In our culture, a person who doesn’t get married will be considered to be disobedient towards their parents,” says a gay man identified as John, a lawyer in his 30s.

So John turned to a solution known as a "cooperative marriage:" He married "Xiaodan," who is lesbian, a year ago. In a nation where being gay is not acceptable, John and Xiaodan asked not to be identified by their real names.

Cooperative marriages seem to be gaining popularity as matchmaking websites and apps get into the act. One service, Chinagayles.com, boasts more than 45,700 successful marriages. John and Xiaodan's own longtime partners got married to each other just a week after their wedding.

But the arrangements aren't always just a matter of a quickie ceremony and a convenient excuse for relatives. The couple spoke to me at the apartment John bought for Xiaodan and her partner as part of their marriage contract. It’s a spotless one-bedroom with a small sofa and no dining table. John says the idea was to create a space where parents and in-laws were less inclined to drop by unannounced for a meal, or to spend the night.

The marriage contract also divvies up wedding expenses and even covers child support; both John and his wife eventually want a child. He’ll pay 70 percent of the expenses, she’ll pay 30.

John is out to a handful of friends, but he worries his elderly parents would spend the rest of their lives worrying about him being marginalized if he were to come out to his family. “I want them to see the positive part of my life,” John says.

Xiaodan says she entered a cooperative marriage because she wanted to have a child and to make her parents happy. Chinese New Year is an especially taxing time for young, unmarried gay people. It's "Christmas times five," she says — and with blind dates. But she admits it’s also difficult for parents.

“Sitting around the table, everyone asks, ‘When did your daughter start dating? When will she get married?’” Xiaodan says. “It’s a constant comparison: Who has a baby first? Whose grandchild does better in school? Whose child earns more money? I only run into these people once in a while. But for my parents, they are always in this environment.”

LGBT advocates say China’s one-child policy has upped the ante, intensifying pressure on only children to carry on family lines. But they're divided on the value of cooperative marriages as a solution.

Some see the unions as a more honest option than entering a traditional marriage while keeping true sexual preferences a secret. Others, like Steven Bielinski, an American gay rights advocate and the founder of Shanghai LGBT Professionals, thinks of them as a poision pill.

“If people decide to disappear into these marriages of convenience, it’s only going to acquiesce to the status quo of stigma here in China,” he says. “By entering into these marriages, it’s reinforcing heterosexual marriage, heterosexual identity, as the only acceptable, normative, positive lifestyle for people.”

There is at least one place in China where gay lifestyles are discussed quite openly: the Internet. Bielinski points to a 2014 survey by Baidu, China’s largest search engine, which found 86 percent of users aged 18 to 25 “totally accept homosexuality.”

But, back in her tidy apartment, Xiaodan says even if China were to legalize gay marriage, it would take years — if not decades — for social attitudes to change. And besides, the pair even enjoyed their wedding; John’s partner was his best man, Xiaodan’s partner was her maid of honor.

“When we were taking wedding pictures, we took some of just the men — me and my partner,” John says. “Actually, I didn’t feel the wedding was for me and Xiaodan. I felt it was for me and my boyfriend. And the women, they felt it was their wedding too.”

As John makes tea, Xiaodan takes a few wedding photos out of a drawer and frets over her appearance like any other bride. “I really don’t like this because it’s so tight,” she says, pointing at a picture of herself in a fairytale wedding gown, a tiara tucked into her hair. “I can’t imagine this is me!”

Reality is no fairy tale, either. Xiaodan’s partner is seeing someone else, so Xiaodan has moved out. For now, her plans to conceive a baby with John through artificial insemination are on hold.

“I used to think my life was so beautiful, so happy, and I wanted to show that to my baby,” Xiaodan says. “Now I feel financial pressure, relationship pressure, family pressure. I’m a bit scared.”

John says he respects Xiaodan's choices no matter what, but he thinks she might regret not moving ahead on having a child. If and when they do have a child, he says, “I will let him or her know that love between the same gender is very normal, and sometimes great.”