Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8449047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:35:41+00:00 2026-06-10T10:35:41+00:00

I’m generating a JSON thru PHP to integrate into an application for android, I

  • 0

I’m generating a JSON thru PHP to integrate into an application for android, I do not know if it is correct as I am doing, because a lot do not know of PHP, JSON is generated without indentation and am having trouble reading in java, then wonder if it is correct, and if there is any example is welcome.

follows the code below:

<?php

 $modulos = array(
     "inicial" => array(
            "conteudo" => "A  é uma empresa especializada no desenvolvimento de
                    aplicativos móveis e sistemas para smartphones e tablets. ",
            //Não é o logotipo, é a imagem principal da primeira pag
            "imagem" => "http://.com.br/wp-content/uploads/logotipo.png"
                        ),// fim nó inicial

    "quemsomos" => array(
        //conteudo bem resumido, seria intereçante o usuario ter um local no site
        // para definir os textos e parametros mobile
        "conteudo" => "Desenvolve soluções móveis de acordo com a necessidade do cliente 
                       independentemente do segmento, exploramos as amplas possibilidades 
                       dos novos recursos em comunicação móvel para uso em Smartphones e Tablets."
                        ),//fim nó quem somos

    "produtos" => array(
        "produto" => array(
            "titulo" => "Aplicativo gloop",
            "descricao" => "Pacote completo, Web Site/App IOS/App Android",
            "imagem" => "http://site.holyis.com/sites/5/imagens/logo.png",
            "detalhes" => "link de JSON que contem dados dos detalhes do produto"
                        ),

        //para mais que um produto é só copiar o primeiro e incluir aqui
        "produto" => array(
            "titulo" => "Aplicativo gloop ",
            "descricao" => "Pacote completo, Web Site/App IOS/App Android",
            "imagem" => "http://site.holyis.com/sites/5/imagens/logo.png",
            "detalhes" => "link de JSON que contem dados dos detalhes do produto"
                            ),
                        ),//fim nó produtos

    "servicos" => array(
        "servico" => array(
            "titulo" => "Desenvolvimento mobile",
            "descricao" => "Atuamos no desenvolvimento de aplicações móveis para as 
                            plataformas IOS e Android usando seus próprios SDKs. Publicamos
                            sua aplicação nas lojas Apple Store e Google play.",
            "imagem" => "http://.com.br/wp-content/uploads/2012/08/android-iphone-sdk1.png"
                            ),
        //para mais que um servico é só copiar o primeiro e incluir aqui
        "servico" => array(
            "titulo" => "Implementação de idéias",
            "descricao" => "Teve uma idéia mas não tem conhecimento para implementa-la ? 
                            Entre em contato que temos toda estrutura para colocar em prática.",
            "imagem" => "http://.com.br/wp-content/uploads/2012/08/ideia.png"
                            ),
                        ),//fim nó servicos


                );//fim nó pai

utf8_encode($modulos);
$json = json_encode($modulos);

echo $json;


?>

result:

{“inicial”:{“conteudo”:”A \u00e9 uma empresa
especializada no desenvolvimento de\n\t\t\t\t\taplicativos m\u00f3veis
e sistemas para smartphones e tablets.
“,”imagem”:”http://.com.br/wp-content/uploads/logotipo.png&#8221;},”quemsomos”:{“conteudo”:”Desenvolve
solu\u00e7\u00f5es m\u00f3veis de acordo com a necessidade do cliente
\n\t\t\t\t\t independentemente do segmento, exploramos as amplas
possibilidades \n\t\t\t\t\t dos novos recursos em
comunica\u00e7\u00e3o m\u00f3vel para uso em Smartphones e
Tablets.”},”produtos”:{“produto”:{“titulo”:”Aplicativo gloop
“,”descricao”:”Pacote completo, Web Site/App IOS/App
Android”,”imagem”:”http://site.holyis.com/sites/5/imagens/logo.png&#8221;,”detalhes”:”link
de JSON que contem dados dos detalhes do
produto”}},”servicos”:{“servico”:{“titulo”:”Implementa\u00e7\u00e3o de
id\u00e9ias”,”descricao”:”Teve uma id\u00e9ia mas n\u00e3o tem
conhecimento para implementa-la ? \n\t\t\t\t\t\t\tEntre em contato que
temos toda estrutura para colocar em
pr\u00e1tica.”,”imagem”:”http://.com.br/wp-content/uploads/2012/08/ideia.png&#8221;}}}

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:35:42+00:00Added an answer on June 10, 2026 at 10:35 am

    It is correct, in the future you can check for yourself using JSONLint

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I know there's a lot of other questions out there that deal with this
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.